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)
 inserting many rows to a table via xml

Author  Topic 

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2008-02-18 : 13:18:44
Hi,

In sql server 2000 I once wrote a procedure where I sent a xml document as a parameter and it inserted all the rows to the database.

Has anything changed with sql server 2005 or its the exact same process?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-18 : 13:27:29
I think you had used OPENXML in SQL 200. You can use the same feature in SQL 2005 to achieve this. Look into BOL for syntax & sample usage.
Go to Top of Page

sql777
Constraint Violating Yak Guru

314 Posts

Posted - 2008-02-18 : 15:09:11
Is there anything new in sql 2005 that has similiar functionality?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-19 : 00:52:06
To get details from xml to table columns i have always used OPENXML feature. You can give appropriate flags to get element centric and attribute centric data from xml.BOL clearly has a good description of this feature. Also refer this link

http://www.informit.com/articles/article.aspx?p=26499
Go to Top of Page
   

- Advertisement -