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 |
|
Pumkin
Starting Member
20 Posts |
Posted - 2005-08-22 : 07:54:51
|
| Hello everyone.I have this sql string@sql='select'+@key +'From table' + char(10) + 'PRINT @key'EXEC sp_executesql @sqlThe value @key is correctly returned in the sql stringBut the problem is I need it after I execute the SQLString.If after execution I write another PRINT, the value is null.How can I get the value to work with it in my procedure?Thanks for your time. |
|
|
Pumkin
Starting Member
20 Posts |
Posted - 2005-08-22 : 08:24:15
|
| Sorry..I found how to solve my problemEXEC sp_executesql @sql N'@Key as varchar(3) OUT' , @Key OUTThanks anyway |
 |
|
|
|
|
|