Inserting XML Through Bulk Load
XML Bulk Load allows you to load semistructured XML data into Microsoft SQL Server.
You can insert XML data into a SQL Server database by using an INSERT statement and the OPENXML function. This bulk load utility provides higher performance when you need to insert large amounts of XML data.
CREATE TABLE bulktable1(XmlCol xml)
go
-- One row affected (one or multiple nodes)
INSERT into bulktable1(XmlCol)
SELECT *
FROM OPENROWSET(Bulk 'C:\xmltype\demo\SampleData2.txt',
SINGLE_CLOB) as x
go
The input Xml file is
No comments:
Post a Comment