Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Must declare the scalar variable "@value4".

$
0
0
Dear Team,We are getting error while executing below code. Please help.SET QUOTED_IDENTIFIER OFFDECLARE @value5 INTdeclare @qry varchar(500)DECLARE @value4 varchar(20)DECLARE @database_name varchar(50)set @database_name = 'testdb1'set @qry = 'SELECT @value4= COUNT(*) FROM '+@database_name+'..test_table'exec (@qry)Error :- Msg 137, Level 15, State 1, Line 1Must declare the scalar variable "@value4".

Viewing all articles
Browse latest Browse all 3145

Trending Articles