are both Global Input Params for the Stored Procedure, and since I am compiling the SQL query inside the Stored Procedure with T-SQL then using
Exec(@sqlstatement) at the end of the stored procedure to show the result, it gives me this error when I try to use the
@RowTo inside the
@sqlstatement variable that is executed.. it works fine otherwise.. please help.
"Must declare the scalar variable "@RowFrom"."
Also, I tried including the following in the
'Declare @Rt int' 'SET @Rt = ' + @RowTo
@RowTo still doesn’t pass its value to
@Rt and generates an error.