XSD element update based on another element

  • I'm not sure this is the right forum for an XSD discussion, but it does tie to SQL Server.

    I have an element that I want to update based on information stored in another element. I'm really new to XML, so any advice may point me in the right direction.

    Thanks!

  • WITH XMLNAMESPACES('EmployeeXSD' AS E)

    SELECT

    nref.value ('@DepartmentID', 'int'),

    nref2.value('@EmployeeID', 'int'),

    nref2.value('@Salary', 'money')

    FROM@xml.nodes('/E:Department') AS R(nref)

    CROSS APPLY R.nref.nodes('./E:Employee') AS R2(nref2)

    this is the sample query u could tryout from this query.

    Abhijit - http://abhijitmore.wordpress.com

  • Can you provide the XML ?

    Abhijit - http://abhijitmore.wordpress.com

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

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