XML type question, I''m stuck! XPERT help needed

  • Hi All,

    I've got a table here (sims.sims_member) with person_id in it.

    I need to loop through it and pass the xml to the stored proc.

    How do I get this text into the local variable @personids ??

    -----------------------------------------------------------------

    declare @personids varchar(5000)

    -- This is an example call

    exec sims.att_pix_sync_student_marks_ATW625 @personids = '<data> <row person_id="1" /> <row personid="2" /></data> '

    Thanks, Tim

  • This was removed by the editor as SPAM

  • Tim,

    The simple answer is "no".  You cannot easily do what you are asking in SQL Server 2000.  There are ways to export the result to a text file, which can then be loaded back into a single column in a table.  Once the result set is back in a table you can query the table into a local variable.  An example of this approach can be found here:

    http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=9336&FORUM_ID=5&CAT_ID=3&Topic_Title=SQL+Server+2000+XML&Forum_Title=Developer

    hth

    Wayne

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

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