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
 Transact-SQL (2000)
 sp and array

Author  Topic 

tuenty
Constraint Violating Yak Guru

278 Posts

Posted - 2004-09-29 : 15:50:05
Is it possible to make a stored procedure that receives arrays as parameters?

Can somebody show me how?

*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*

A candle loses nothing by lighting another candle

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2004-09-29 : 16:21:47
This is an example of it being done in a function - It will probably also work for a SP

http://www.sqlteam.com/item.asp?ItemID=11499


Duane.
Go to Top of Page

tuenty
Constraint Violating Yak Guru

278 Posts

Posted - 2004-09-29 : 17:08:28
I was thinking to implement some kind of logic like the one on the example but I was tring to avoid it because each element is around 100 character long and in some rare cases there will be around 15 and in fact there is no limit so I have to set the size of the string pretty big to prevent the sp from failing.

Each element is a fixed length record that represents a life in a family and since all families have less than 20 members I'll define the field as 2000 character long (hopping that this fact remain) and create the sp following the example.

Thanx

*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*

A candle loses nothing by lighting another candle
Go to Top of Page
   

- Advertisement -