Home Forums Programming XML Non unique id xml node -flatten and import in to sql RE: Non unique id xml node -flatten and import in to sql

  • To shred the xml to flat tables, you will need to use some of the xml data type methods and maybe a little bit of XQuery. the nodes() method will help you shred the xml into a relational format. the value() method will also help you extract data as well.

    Here are some links to get you started.

    http://msdn.microsoft.com/en-us/library/ms188282.aspx

    http://msdn.microsoft.com/en-us/library/ms178030.aspx

    http://msdn.microsoft.com/en-us/library/ms189075.aspx

    However, have you posted live data in your example? it does look surprisingly realistic? and the addresses in the xml seem to be genuine for customers in the xml.. I hope I'm wrong and that the data is just test data and I wish that I had such good quality test data to work with 😀