CompCodeBoy
Programmer
Declare @number int
set @number=10
DECLARE @strSQL varchar(1200)
set @strSQL = ' select top ('+ @number + ') account from contact'
EXEC(@strSQL)
The error I get is :
Conversion failed when converting the varchar value ' select top (' to data type int.
Any help would be appreciated
set @number=10
DECLARE @strSQL varchar(1200)
set @strSQL = ' select top ('+ @number + ') account from contact'
EXEC(@strSQL)
The error I get is :
Conversion failed when converting the varchar value ' select top (' to data type int.
Any help would be appreciated