Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load XML Files

Status
Not open for further replies.

krotha

Programmer
Nov 5, 2000
116
US
I have few XML files to be loaded in SQL Server 2005. Do I have to use Integrated Services to load these or do I have to write a VB code?

Thanks for any help.
 
There are ways to do this with SSIS. I prefer to do this with T/SQL.

Create a table with a single column using the XML data type. Then load the entire XML document into a single row of the table using the BULK INSERT command with the RAW flag.

Then use openxml to turn the XML data back into relational data.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top