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 2008 Forums
 Transact-SQL (2008)
 XML Data Insert To Table

Author  Topic 

JanakiRam
Starting Member

22 Posts

Posted - 2013-06-28 : 06:47:05
Need a query for xml data insert to table columns are dynamically added

JanakiRam

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-06-28 : 07:05:49
there are various methods

1.bcp
2.SSIS
3.OPENROWSET BULK and then using XML functions like nodes() to shred data onto individual columns

http://visakhm.blogspot.com/2010/04/using-xml-to-batch-load-master-child.html

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

JanakiRam
Starting Member

22 Posts

Posted - 2013-06-28 : 07:42:20
BCP OR OPENROWSET BULK ...........

JanakiRam
Go to Top of Page

JanakiRam
Starting Member

22 Posts

Posted - 2013-06-28 : 07:44:38
I Have number of XML files so i could not specify any column names, based on xml file columns new table will be generated or insert into any hash table, Please...........

JanakiRam
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-06-28 : 10:55:18
hash table? why a hash table? do you realize hash table has scope only within the connection in which its created?

A for looping through XML files you need to use a loop in T-SQL or SSIS

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

- Advertisement -