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)
 Dynamic input variables for stored procs?

Author  Topic 

etietje
Starting Member

24 Posts

Posted - 2002-12-27 : 12:51:19
Hello.

I really need a way to have a random number of variables as inputs into a stored procedure. Is there a way to have a dynamic number of variables as inputs with SQL 2000? Thanks in advance for any help you can give me.

Eric

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2002-12-27 : 13:25:46
Hi

AFAIK, you cant pass a variable number of parameters to a SP. But there might be plenty of work arounds, depending on what you want to do. If the number of params is fairly small, you might consider making them optional parameters. Else, you might insert the data into a temp table and then access them from within the SP.

In SQL2000, (I think) you can pass in a variable of table datatype

HTH

OS



Go to Top of Page

tool
Starting Member

26 Posts

Posted - 2002-12-27 : 14:14:12
Passing in the variables as CSVs may accomplish your goal (not sure from the info you provided). There is plenty of good info on this site regarding CSVs: [url]http://www.sqlteam.com/SearchResults.asp?SearchTerms=csv [/url]

Go to Top of Page
   

- Advertisement -