473,670 Members | 2,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Subquery using X-Path (Nested X-Path statements)

Hi all,

I am trying to convert an SQL statement into an XPath (or a sequence of
XPath) statements. More specifically, I have the following:

SELECT a
FROM b
WHERE c IN (SELECT d FROM e)

I recently learned about XPath and know how to perform simple filtering
(i.e. SELECT). However, I don't know how to work with sub-queries. I
basically don't know how or where to store a temporary result. Also,
can something similar to an IN condition be done using XPath? Can
XPath statements be nested somehow?

It would probably be more straightforward if I used XQuery. However, I
don't think it is an option, since I am programming in C# in Visual
Studio, and it looks like XQueries are not supported here.

Any help is appreciated.

Thank you

Dec 21 '06 #1
1 3209
Could you provide a concrete example of an xml document and the nodes you
need to select?

Cheers,
Dimitre Novatchev
"sql_er" <sq****@yahoo.c omwrote in message
news:11******** *************@4 8g2000cwx.googl egroups.com...
Hi all,

I am trying to convert an SQL statement into an XPath (or a sequence of
XPath) statements. More specifically, I have the following:

SELECT a
FROM b
WHERE c IN (SELECT d FROM e)

I recently learned about XPath and know how to perform simple filtering
(i.e. SELECT). However, I don't know how to work with sub-queries. I
basically don't know how or where to store a temporary result. Also,
can something similar to an IN condition be done using XPath? Can
XPath statements be nested somehow?

It would probably be more straightforward if I used XQuery. However, I
don't think it is an option, since I am programming in C# in Visual
Studio, and it looks like XQueries are not supported here.

Any help is appreciated.

Thank you

Dec 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2910
by: Ramon M. Felciano | last post by:
Helo all -- I'm trying to gain a deeper understand for what type of semi-declarative programming can be done through XML and XPath/XSLT. I'm looking at graph processing problems as a testbed for this, and came across a problem that I haven't been able to solve elegantly. The problem is to find "linker" vertexes that a pair of verteces from a pre-defined set. For example, if the graph verteces represent cities and edges represent flights...
2
1551
by: AR | last post by:
Hi, How can I get strings separately which contain text nodes of a given element using XSL and XPath? For example, <a> aaa 111 <b>
2
4303
by: Jim Irvine | last post by:
Does anybody know the limit of nested iif statements you can use in Access?
1
2448
by: redpayne | last post by:
Ok-I am doing homework out of a book and the instructions are to display an interface with 5 option buttons in a frame. When clicked, each button changes the background color of the frame. It proceeds to tell me to construct CheckboxGroup, use FlowLayaout and add the Checkboxes to the frame along with ItemListener. It says addWindowListener()method, write code for itemStateChanged() which uses the getState() method and nested if statements....
9
9324
by: paulyche | last post by:
I'm writing a program which contains an awful lot of nested if statements. I don't know how efficient this is but it definetely makes the code less readable. Does anyone have any advice on how I can improve the following kind of code? Apparently other languages have a switch statement which is useful here...Python seems to lack this functionality. My Python is self-taught so I'd appreciate any outside input. Lots of the code involves...
5
1590
patjones
by: patjones | last post by:
Hi: I have a table in my Access database, "tblWC", which contains a field called "fldTrackingStatus". Furthermore, I have a report "rptTrackingReport" which is based on tblWC (using an SQL query written out in VB). The report sorts all the records out by fldTrackingStatus, which can have an integer value between 1 and 5 inclusive. The problem is, the report is putting "1", "2", "3", etc. at the top of each tracking status sub-section. I...
1
1384
by: RAJ | last post by:
hi there, can anybody suggest me best sites for learning php with nested sql statements. i need sql query for searching from database with lots of options like using AND, OR etc even using multiple tables thanks, raj
0
1284
by: Neil Cerutti | last post by:
The docs say: A suite can be one or more semicolon-separated simple statements on the same line as the header, following the header's colon, or it can be one or more indented statements on subsequent lines. Only the latter form of suite can contain nested compound statements; the following is illegal, mostly because it wouldn't be clear to which if clause a following else clause would belong: if test1: if test2: print x
5
4570
by: =?Utf-8?B?VGFtbXkgTmVqYWRpYW4=?= | last post by:
Hi, I am using Visual C# window creating an application to read an xml file. At some point I need to use XPathNavigator and XPathNodeIterator however when I used those subjects I get error message . I add the "System.Xml.XPath" class however it either empty or not implemented. This problem happened also when I was going to use FlowLayoutPanel. How I can activate the above classes? Do I need to instal something? Thanks -- Nejadian
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8901
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8814
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6213
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4209
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4390
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2799
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2041
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1792
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.