Jump to content

SQL Server 2005 "XML datatype" to SQL Table


gagan8877

Recommended Posts

Hi AllI am new to XML. The source application stores data in SQL Server 2005 in XML datatype column. We have to extract and load the XML data into relational tables for faster querying and reporting for a data warehouse. We do have an XSD file from the application developer. Now our tasks are:1. Create tables (data model) in SQL Server 2005 to load extracted XML data.2. Map XML data to various columns in these newly created tables.3. Extract XML data from the XML column.4. Load data to newly created tables for further transformation.Now the questions are:1. Is there a tool that can convert XSD to SQL DDL? Doing it manually will be very time consuming. (FYI: We are exploring Altova XMLSpy - which is a potential candidate)2. How can I map data from XML to relational table columns? Is there a tool that can help me there? Does XSLT file help in achieving this goal? What is the best approach?3. What is the best way to extracrt XML data and load it to relational SQL tables? Suggestions will be appreciated.ThanksGary

Link to comment
Share on other sites

I can't help you with the first question, mostly because I have never even head of this "SQL DDL" thing.For the second one, I can tell you for sure that XSLT is NOT the solution. XSLT can convert XML to another XML based document or plain text, but not any other formats.The only sure way I know to map XML to SQL data fields would be to use a server side script, but writing it would be such a big pain...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...