June 8, 2007 at 1:13 pm
Hi there!
I'm wondering if there is anyone out there who has any experience in passing an array of data created in a VB Script to a stored procedure? I have started reading about the table variable available in 2000 but not sure if that is what I need.
Here's what I'm trying to accomplish...I'll read the first "record" in the array and search a table to see if we have this customer on file already. If we do then run the update procedure, if not, run the insert procedure. Grab the next record and do the same...until I've cycle'd through the array.
Is the table variable what I want or is there something else?
Any help would be appreciated. Thanks!
Darryl
June 8, 2007 at 3:06 pm
The short answer is not really.
But as always it depends what your trying to do.
You can pass in XML, and use the sp_xmlpreparedocument, and with.
or you can pass in comma separated strings, and use a table function to parse and return the data.
Attached is a very good read.
http://www.sommarskog.se/arrays-in-sql-2000.html
June 15, 2007 at 9:19 pm
fyi, in 2008 we will finally have arrays natively in sql:
https://connect.microsoft.com/SQLServer/content/content.aspx?ContentID=5507
---------------------------------------
elsasoft.org
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply