Hi all,
I'm trying to generate the SQL in the fetch component of a cusror using variables.
i.e.
declare z_cursor for
select storeid from @table
when I try to run it I get "must declare @table". It has been declared and populated, there are no "go" statements between to clear the variable.
Can anyone help with a way to use variables in the cursor declare step?
Thanks
Mark