Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Help insert XML data

Author  Topic 

lakon15
Starting Member

12 Posts

Posted - 2008-01-04 : 01:59:22
Dear All,

I'm new handle XML file, I have a question how to create procedure insert XML data into SQL table, let say we have table with schema like this
create table testXML
(col1 real,
col2 real,
col3 real)

I want to insert XML data
<firstdata>
<data>499,498.99,1.25</data>
<data>500.01,500,1.9</data>
<data>501.03,501.02,2.92</data>
</firstdata>

the result we need is
col1 col2 col3
499 498.99 1.25
500.01 500 1.9
501.03 501.02 2.92

thank's before

Regards

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2008-01-04 : 02:32:37
what's better than xml? why, a combination of xml and csv of course!

seriously, do you have the freedom to change that xml format? it's pretty horrible.


elsasoft.org
Go to Top of Page
   

- Advertisement -