Link to home
Start Free TrialLog in
Avatar of Jordan_WM
Jordan_WM

asked on

Loading XML File into SQL 2008

Hello,

I very new to loading XML files into SQL Server 2008 and trying to understand what would be the best solution to do this. I have been presented with an CXML which is 4gigs and a XSD file. I have been able to load the XML file into a table with a XML column as shown below in the following script.

INSERT INTO Test_XML_Column
SELECT 10, xCol
FROM    (SELECT *    
    FROM OPENROWSET (BULK 'G:\Data\TestData.xml', SINGLE_CLOB)
 AS xCol) AS R(xCol)

What I am now trying to understand is how get the data elements out of the XML column, is there a way I can leverage the XSD file creating an assembily, creating another table to hold the XSD information or hard code the data elements to get into in SQL query to parse out the values and get into SQL tables.

Thanks,

LJ
ASKER CERTIFIED SOLUTION
Avatar of 5teveo
5teveo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jordan_WM
Jordan_WM

ASKER

Thanks Steveo, that's exactly what I am looking for :-)