taslim shaikh
asked on
xml files
Hi,
I've never worked with xml files. I'm getting 30+ files with data that I need to load into sql table. How do I do that
Thanks Taz
I've never worked with xml files. I'm getting 30+ files with data that I need to load into sql table. How do I do that
Thanks Taz
you can try openxml or xpath to do that.
You can use OPENROWSET or OPENXML
Refer below examples:
https://www.mssqltips.com/sqlservertip/2899/importing-and-processing-data-from-xml-files-into-sql-server-tables/
Refer below examples:
https://www.mssqltips.com/sqlservertip/2899/importing-and-processing-data-from-xml-files-into-sql-server-tables/
if you want to automate the importing process, you probably can use SSIS or build a custom ETL program for that purposes.
ASKER
Hi Naitik Gamit,
The solution you suggested seems good but I get confused with the line below. My xml files does not have the "ROOT" tag, it has page headers, totals, etc..
Help Taz
SELECT CustomerID, CustomerName, Address
FROM OPENXML(@hDoc, 'ROOT/Customers/Customer')
The solution you suggested seems good but I get confused with the line below. My xml files does not have the "ROOT" tag, it has page headers, totals, etc..
Help Taz
SELECT CustomerID, CustomerName, Address
FROM OPENXML(@hDoc, 'ROOT/Customers/Customer')
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you