SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Upload XML
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sanjay5219
Posting Yak Master

207 Posts

Posted - 05/01/2013 :  10:02:59  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

3322 Posts

Posted - 05/01/2013 :  10:40:43  Show Profile  Reply with Quote
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

India
52249 Posts

Posted - 05/02/2013 :  01:35:28  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000