XQUERY In sql server

  • 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

    But how can we use this in SQL Server.

    🙂

  • 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

  • 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.

    🙂

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply