I would like to learn how to use declare
.
My query is like:
declare @iter int
set @iter = 1
error:
Msg 137, Level 15, State 1, Line 1 Must declare the scalar variable "@iter".
Please help!
I would like to learn how to use declare
.
My query is like:
declare @iter int
set @iter = 1
error:
Msg 137, Level 15, State 1, Line 1 Must declare the scalar variable "@iter".
Please help!
That can be done in one or two lines: