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 2000 Forums
 Import/Export (DTS) and Replication (2000)
 xml import

Author  Topic 

wotrac
Yak Posting Veteran

98 Posts

Posted - 2005-04-25 : 14:03:51
Hi

I don't know if this is the right forum for this question, but here goes.
I want to be able to import an xml file into sql server.
The xml file is a purchase order from a customer, so it contains a header and multiple detail lines. How do i go about mapping the nodes etc onto the relevant fields in a table.

mfemenel
Professor Frink

1421 Posts

Posted - 2005-04-25 : 14:50:19
take a look at openxml in books on line. There are several different examples depending on how you want to go about doing this.

Mike
"oh, that monkey is going to pay"
Go to Top of Page

mpetanovitch
Yak Posting Veteran

52 Posts

Posted - 2005-04-28 : 01:56:35
I've looked into this as well and unfortunately its not too straight forward.

Here is a good link

http://www.microsoft.com/sql/techinfo/tips/development/importingxmlfile.asp

Also, if you have application development skills you could create a assembly that consumes the xml doc into a string variable. Then pass it via a stored procedure to the db where then you would use openxml statement.


Mike Petanovitch
Go to Top of Page

bluemetal
Starting Member

26 Posts

Posted - 2005-04-28 : 02:06:06
Hi, you can read my other post in the topic importing xml, i've given an example. (just the topic below this one)
Go to Top of Page
   

- Advertisement -