Please Use this in your procedures and functions
DECLARE C21 CURSOR FOR <Query to find Value on basis of ...>
OPEN C21
FETCH FROM C21 INTO @col
WHILE @@FETCH_STATUS = 0 BEGIN
-----Do your tasks here according to cursor
FETCH FROM C21 INTO @col
END
CLOSE C21
DEALLOCATE C21
0 comments:
Post a Comment