Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Insert Query with XML document

Author  Topic 

Swati Jain
Posting Yak Master

139 Posts

Posted - 2008-10-01 : 07:46:27
Hello All,

Insert query consists of inserting 200s of parameters in table with 200 of fields,

How to pass the xmldocument to stored procedure and execute insert without writing insert query for every parameter

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-10-01 : 07:50:50
declare a parameter of type xml and pass the document. then use @xmlparam.nodes to get each node info and value() function to get individual values from each node.

example see below

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=97749
Go to Top of Page
   

- Advertisement -