Invalid Column Name Sql-Error :Executing a stored procedure

Joined
Feb 21, 2018
Messages
216
Reaction score
86
I am executing a stored procedure .... the following command need to be rectified.

set @str = "Update [dbo].[Lists] SET ASREFSER='"+@server+"' where isnull(ASREFSER,'')=''"

exec ( @str )

Error Message as shown by SQL Server 2012 is as follows
Invalid column name 'Update [dbo].[Lists] SET ASREFSER=''.


I confirmed that the column name is correctly spelled.

Please help
 
Back
Top