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
 SQL Server Development (2000)
 inserting multiple items

Author  Topic 

bangingtunes
Starting Member

23 Posts

Posted - 2003-12-12 : 21:17:30
What other ways or inserting multiple items are there. Im currently using xml and insert into / openxml as shown below. But i need to allow for xml strings that could well be longer than 8000 characters.
I dont really want to make an sql call from my client app for each line. Has anyone got any other ideas? I was considering some approach using multiple 8000 character xmlstring input parameters, and performing an insert from each. Can the apporach below be used with a text data type?

INSERT INTO InvoiceItems ( InvoiceID, Description, Qty, Price, VAT) SELECT @InvoiceID, Description, Qty, Price, VAT
FROM OPENXML (@hDoc,'/Invoice/InvoiceItems', 2)
WITH InvoiceItems

Kristian

ehorn
Master Smack Fu Yak Hacker

1632 Posts

Posted - 2003-12-12 : 21:37:37
Yes,

Take a look at the following links for useful articles related to this topic.

http://www.sqlteam.com/FilterTopics.asp?TopicID=128
http://www.sqlxml.org
Go to Top of Page
   

- Advertisement -