sqlserverbest
Programmer
I tried this sql query and it said I need to declare @rowcount variable when it is already declare. What is the problem here.
DECLARE @sql varchar(1000), @rowccount int
SET @sql = 'Select @rc=count(*) From ttg_position_stg'
EXECUTE sp_executesql @sql, N'@rc int output', @rc=@rowcount output
Help is appreciated
DECLARE @sql varchar(1000), @rowccount int
SET @sql = 'Select @rc=count(*) From ttg_position_stg'
EXECUTE sp_executesql @sql, N'@rc int output', @rc=@rowcount output
Help is appreciated