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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-06-17 : 08:30:19
|
| Gary writes "Is there any way to dynamically build a reference to input parms (or variables, for that matter)? For example, if I had @inputparm0 int, @inputparm1 int, etc, is there any way to reference those input parms by building the name in a loop, concatenating the @inputparm part with the 0 or 1 part somehow? I don't think it can be done, but just wondering." |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-06-17 : 08:51:02
|
| So I'm assuming you have a procedure like:CREATE PROCEDURE myProc @input0 varchar(10), @input1 varchar(10), @input2 varchar(10) AS... etc.And you won't always be passing each and every parameter. How about passing all of the variables as one comma-separated value (CSV) and then parsing them out? We've got a number of ways of doing that:http://www.sqlteam.com/SearchResults.asp?SearchTerms=csv |
 |
|
|
|
|
|