June 12, 2006 at 4:50 am
Hi all,
Looking at trying to get an XML file imported into a table for manipulation.
Given this piece from BOL, I have hopes that Bulk Insert in 2005 can handle XML:
Bulk Exporting or Importing SQLXML Documents
To bulk export or import SQLXML data, use one of the following data types:
Data type Effect
SQLCHAR or SQLVARYCHAR
The data is sent in the client code page or in the code page implied by the collation). The effect is the same as specifying the DATAFILETYPE = 'char' without specifying a format file.
SQLNCHAR or SQLNVARCHAR
The data is sent as Unicode. The effect is the same as specifying the DATAFILETYPE = 'widechar' without specifying a format file.
SQLBINARY or SQLVARYBIN
The data is sent without any conversion.
Am I mistaken? If so, is SSIS the only way to get XML data into a SQL table?
June 15, 2006 at 8:00 am
This was removed by the editor as SPAM
June 16, 2006 at 7:13 am
you can use OPENROWSET to load any files into database, e.g.:
DECLARE @xml xml
SELECT @xml=CAST(BulkColumn as xml) FROM OPENROWSET(BULK N'C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ProcessXMLData Sample\DataFiles\Orders.xml', SINGLE_BLOB) A
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply