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)
 Upload XML

Author  Topic 

sanjay5219
Posting Yak Master

240 Posts

Posted - 2013-05-01 : 10:02:59
Hi All,

We have a requirement to upload XML, Just wanted to check if I should pursue with SQL or shall I create program in ASP.NEt

PLease suggest

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-05-01 : 10:40:43
By uploading I assume you mean loading data from an XML file into a SQL database. For this purpose, you can use a T-SQL solution, or you can use a .Net solution. Probably T-SQL using BULK INSERT would be faster. There are examples on this page http://msdn.microsoft.com/en-us/library/ms191184.aspx
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-05-02 : 01:35:28
if you just wanted to upload XML value as it is into XML typed columns, use OPENROWSET...BULK option as suggested in link above

if your attempt is to shred the data from XML onto columns in the sql table you should use nodes(),query() etc methods

https://www.simple-talk.com/sql/database-administration/manipulating-xml-data-in-sql-server/



------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -