SQL server 2005 XML data import

djrr

New Member
I have xml data in a format similar to the below:\[code\]<Orders> <Order> <OrderID>1</OrderID> <OrderInfo>mydetails</OrderInfo> <orderlines> <orderline> <orderlineref>1.1</orderlineref> <product>myproduct</product> <quantity>5</quantity> </orderline> <orderline> <orderlineref>1.2</orderlineref> <product>myproduct1</product> <quantity>7</quantity> </orderline> </orderlines> </Order></Orders>\[/code\]I would like to import this into SQL server 2005 using bcp (or any other method really) as long as it runs reasonabbly fast.How do I go about creating the format file for this type of XML?Or am I looking in the wrong direction.So far the only way I have managed to import this data isusing openrowset but it takes way too long.Any suggestions please?
 
Back
Top