Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 8th, 2011, 11:58 AM
Authorized User
Points: 134, Level: 2
Points: 134, Level: 2 Points: 134, Level: 2 Points: 134, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2009
Posts: 30
Thanks: 9
Thanked 0 Times in 0 Posts
Default XQuery filter

Hello,

How to filter the node based on specif condition? I have this data in database table (ID int ,data XML)

<MyData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Summary>
<GeneralInfo>
<Name>Organization1</Name>
<Country>India</Country>
</GeneralInfo>
<List>
<Summary>
<P_Name>Merry</P_Name>
<Costing>200</Costing>
<DataList1>
<Data>
<Type1>R01</Type1>
<Type2>R02</Type2>
<Type3>R03</Type3>
<Type4>R04</Type4>
<Type5>R05</Type5>
</Data>
<Data>
<Type6>R06</Type6>
<Type7>R07</Type7>
<Type8>R08</Type8>
<Type9>R09</Type9>
</Data>
</DataList1>
<DataList2>
<Data>
<Type1>R10</Type1>
<Type2>R11</Type2>
<Type3>R12</Type3>
<Type4>R13</Type4>
<Type5>R14</Type5>
</Data>
<Data>
<Type6>R15</Type6>
<Type7>R16</Type7>
<Type8>R18</Type8>
<Type9></Type9>
<Type10></Type10>
</Data>
</DataList2>
</Summary>
<Summary>
<P_Name>John</P_Name>
<Costing>200</Costing>
<DataList1>
<Data>
<Type1>R18</Type1>
<Type2>R19</Type2>
<Type3>R20</Type3>
<Type4>R21</Type4>
<Type5>R22</Type5>
</Data>
<Data>
<Type6>R23</Type6>
<Type7>R24</Type7>
<Type8>R25</Type8>
<Type9>R26</Type9>
</Data>
</DataList1>
<DataList2>
<Data>
<Type1>R28</Type1>
<Type2>R29</Type2>
<Type3>R30</Type3>
<Type4>R31</Type4>
<Type5>R32</Type5>
</Data>
<Data>
<Type6>R33</Type6>
<Type7>R34</Type7>
<Type8>R35</Type8>
<Type9>R36</Type9>
<Type10>R37</Type10>
</Data>
</DataList2>
</Summary>
</List>
</Summary>
</MyData>

I have to filiter the data for Specific ID from the table and P_Name is John. I wish to retrive data for Type1 and Type6

How toacheve this with XQUERY?

Thanks
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with XQuery nelly78 XML 1 January 20th, 2010 07:10 PM
Problem with XQuery nelly78 BOOK: Beginning XML, 4th Ed ISBN: 978-0-470-11487-2 0 January 20th, 2010 04:50 PM
security on Xquery Tomi XSLT 3 May 7th, 2007 07:34 AM
How to get a XQuery.msi ? goldensaying XML 1 December 13th, 2006 01:01 PM
XQuery sonicDace XML 2 March 19th, 2004 05:45 PM



All times are GMT -4. The time now is 08:22 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.