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
 Transact-SQL (2005)
 Parsing XML data to SQL Server

Author  Topic 

lakon15
Starting Member

12 Posts

Posted - 2008-01-07 : 01:08:16
Dear All,

I'm new in SQL server, Is it posible to insert XML data into SQL table, example we have table 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>

And we want the result is value of the XML data separate by comma, like this
col1 col2 col3
499 498.99 1.25 ---> firs row
500.01 500 1.9 ---> second row
501.03 501.02 2.92 ---> third row

Thank's Before

Regards


Agus

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-01-07 : 09:17:18
Have a look at this link. Might help you on this:-

[url]http://technet.microsoft.com/en-us/library/ms345117.aspx#sql2k5xml_xmldatamod[/url]
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-01-07 : 09:33:00
http://weblogs.sqlteam.com/mladenp/archive/2007/06/18/60235.aspx

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com <- new version out
Go to Top of Page
   

- Advertisement -