Reputation: 13213
Is there a way to exit out of the WHILE @@FETCH_STATUS = 0 while performing a db_cursor?
WHILE @@FETCH_STATUS = 0
I tried SET @@FETCH_STATUS = 1, but as i expected, an error. Help?
SET @@FETCH_STATUS = 1
Upvotes: 5
Views: 15765
Reputation: 453037
You can use BREAK to exit a while loop.
BREAK
Upvotes: 21