You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not detected that the second FETCH is not referencing @i_field3:
ALTER PROCEDURE [proc_with_cursor]
AS
BEGIN
CREATE TABLE #mytemp (i_field1 INT, i_field2 INT, i_field4 INT, i_field3 INT )
DECLARE mycursor CURSOR local fast_forward read_only FOR SELECT i_field1,i_field2,i_field3,i_field4 FROM #mytemp
OPEN mycursor
FETCH next FROM mycursor INTO @idGiro, @i_field2, @i_field3, @i_field4
WHILE @@fetch_status = 0
BEGIN
IF ( @i_field4 = 1 )
BEGIN
EXEC [Proc_when_1]
END
ELSE
BEGIN
EXEC [Proc_when_0]
END
FETCH next FROM mycursor INTO @idGiro, @i_field2, @i_field4
END
CLOSE mycursor
DEALLOCATE mycursor
END
The text was updated successfully, but these errors were encountered:
It's not detected that the second FETCH is not referencing @i_field3:
The text was updated successfully, but these errors were encountered: