XML is Killing me!!! Help!!!!!

  • Can anyone out there figure this out? I tried to extract the EmployeeTypeID, butI am not familiar with the syntax.

    /*b) Write a stored procedure which can accept xml as input parameter to update

    tblEmployee table column EmployeeTypeID.

    Input XML

    <EmployeeSupervisors>

    <EmployeeSupervisor>

    <EmployeeSupervisiorID>1</EmployeeSupervisiorID>

    <EmployeeSupervisorName>Chris</EmployeeSupervisorName>

    <Employees>

    <Employee>

    <EmployeeID>10</EmployeeID>

    <EmployeeName>Joseph</EmployeeName>

    <EmployeeTypeID>4</EmployeeTypeID>

    </Employee>

    <Employee>

    <EmployeeID>11</EmployeeID>

    <EmployeeName>John</EmployeeName>

    <EmployeeTypeID>5</EmployeeTypeID>

    </Employee>

    </Employees>

    </EmployeeSupervisor>

    </EmployeeSupervisors>

    You need to extract the xml content and update.

    After update EmployeeID 10 EmployeeTypeID will be 4

    After update EmployeeID 11 EmployeeTypeID will be 5 */

  • A little link to lead you in the right path.

    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=61409

    Dan

    If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.

  • Please ask your tutor if the update should be done using the extracted data or the XML structure. It will influence the solution.

    As a side note: most of us already have a degree in one field or another.

    Therefore, we rarely feel the need to do homework....

    If you have a specific question about how a query works or why you get a different result than expected, we'll be glad to try to figure it out and explain it.

    But at least you should give it a try first.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

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

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