Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

read xml in sql server

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 
Source by www.c-sharpcorner.com #
 
PREVIOUS NEXT
Tagged: #read #xml #sql #server
ADD COMMENT
Topic
Name
6+3 =