CREATE TABLE PointsXML -- Create table for raw XML file.
(
Id INT IDENTITY PRIMARY KEY,
XMLData XML,
LoadedDateTime DATETIME
)
INSERT INTO PointsXML(XMLData, LoadedDateTime) -- Insert xml data into table.
SELECT CONVERT(XML, BulkColumn) AS BulkColumn, GETDATE()
FROM OPENROWSET(BULK 'C:PointsXML.xml', SINGLE_BLOB) AS x; -- Read data from XML file.
SELECT * FROM PointsXML