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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Bulk inserting to existing tables from XML files?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-03-30 : 08:00:34
Sue writes "Windows 2000 Pro SP4 & bare bones MSDE (SQLServer7) with SP4:

I want to bulk load data into my database tables from XML files. The XML is validated, and formed based on the data structure of the tables within the database (eg: I'm loading data, not creating tables). I was doing individual line inserts, but it's taking inordinant amounts of time. I thought to program it out of xml to csv or similar, but I'm wondering, can SQLServer take the XML as XML, as opposed to manipulating and converting the xml into a csv type of file, or individual line inserts?

I did look through your site for this question, and found much about getting data OUT in XML, but nothing about getting data IN from XML. If this is answered elsewhere, villify me but also point me to where the answer can be found.

This work is to support a data load to a database handled by 3rd party software, which uses . My solution must suit both.

Thank you

Sue"

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-03-30 : 08:24:22
There is the OPENXML command that You can use.
I am sure the performance will be crap compared to bcp.
We always ask work with flat files for this kind of stuff, and never XML.

rockmoose
Go to Top of Page
   

- Advertisement -