Shredding data from XML, Importing into Relational Tables (SQL Server 2008)

Puscas_marin

New Member
I have looked everywhere for help on this.I'm new to all this and I'm finding it hard to understand all the documentation on it.Say I have this XML:\[code\]<footballteams> <team manager="Benitez"> <name>Liverpool</name> <ground>Anfield</ground> </team> <team manager="Mourinho"> <name>Chelsea</name> <ground>Stamford Bridge</ground> </team> <team manager="Wenger"> <name>Arsenal</name> <ground>Highbury</ground> </team></footballteams>\[/code\]I want to take the data from this and load it into a relational table called footballteams(name,manager,ground).I would like to do this in SQL Server 2008, and from what I have read everywhere a useful method to do this is .nodes() method. But I just can't understand how to use it.Thank you in advance.
 
Back
Top