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 |
|
muralik
Starting Member
3 Posts |
Posted - 2010-05-13 : 14:14:12
|
| I try to run the following queryDECLARE @FN_SALU_NAME varchar(100)DECLARE @TABLENAME varchar(1000)DECLARE @FN_SALUTATION_ID varchar(5)DECLARE @SQL varchar(5000)SET @FN_SALUTATION_ID = 'AB'SET @TABLENAME = 'PNET_MASTER_SALUTATION'SELECT @SQL = 'SELECT @FN_SALU_NAME = SALUTATION FROM ' + @TABLENAME + ' WHERE SALUTATIONID = ' + @FN_SALUTATION_IDEXEC (@SQL)Must declare the scalar variable "@FN_SALU_NAME".But I have declared the above variable can you help me with this |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|