|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Yesterday @ 5:09 AM
Points: 415,
Visits: 1,458
|
|
Hi,
I'm very new to XQuery's, here i need a situation to Join two different xml's and apply some filter conditions. From the below URL we can write the XQuery [url=http://www.datypic.com/books/xquery/chapter03.html][/url]
But how can we use this in SQL Server.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Yesterday @ 8:27 PM
Points: 6,735,
Visits: 11,788
|
|
I am not exactly sure what you're after but if you provide two sample XML documents and your expected results per your thoughts on the filtering and joining requirement you mentioned we can take it from there.
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Yesterday @ 5:09 AM
Points: 415,
Visits: 1,458
|
|
opc.three (2/13/2013) I am not exactly sure what you're after but if you provide two sample XML documents and your expected results per your thoughts on the filtering and joining requirement you mentioned we can take it from there.
I have a scenario like, in the table few xml data types, example Location it is having country/State data in xml, all this information is related to user (Userid) <Location> <Country Name="India"> <State>HR</State> <Country Name="UK"> <Country Name="USA"> </Location>
We need to query the above xml based on input xml looks same as above, and one extra parameter is @Operatior = And/Or if we send AND then the user Location xml must contain all the input countries if it is or then if is enough to any one country exist in user table of Location field (xml).
Please provider your inputs on this.
|
|
|
|