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 - 2001-01-30 : 11:11:31
|
jon writes "I want to do an iterator inside a stored procedure. this query is trapped inside a WHILE loop which adds iCount ++ at bottom. on top of that, I want to refer the 'blahX' column name as simply 'blah'.
however this doesn't seem to work at all. Do I HAVE to do 8 different queries on top of oneother?
SELECT @sql = "SELECT 'blah' = blah"+@iCount +" FROM best WHERE order_id = @order_id AS best" EXEC(@sql)
(mssql6.5, sp6)
regards Jon" |
|
|
|
|
|