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)
 declaring dynamic variables in SQL

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-10-21 : 08:33:22
Ifti writes "how can you declare variables like @check1, @check2,@check3 ....
where the last digit (i.e 1,2,3 in this case) is taken from the value of another variable. In effect the above variables are declared dynamically.

Thanks in advance"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2004-10-21 : 08:35:24
I'm sure if you were determined enough you could write code to do it, but this is almost certainly a better way:

http://www.sqlteam.com/item.asp?ItemID=637
http://www.sqlteam.com/item.asp?ItemID=2652
http://www.sqlteam.com/searchresults.asp?SearchTerms=csv
Go to Top of Page
   

- Advertisement -