Oct 27, 2004 #1 2314 Programmer Joined May 19, 2001 Messages 69 Location IN how do i loop through a cursor using fetch statement
Oct 27, 2004 #2 lewisp Programmer Joined Aug 5, 2001 Messages 1,238 Location GB Code: OPEN my_cursor(params?); LOOP FETCH my_cursor INTO my_vars; -- EXIT WHEN my_cursor%NOTFOUND; END LOOP; or, better is without FETCH: Code: FOR c IN my_cursor(params?) LOOP do_something; END LOOP; Upvote 0 Downvote
Code: OPEN my_cursor(params?); LOOP FETCH my_cursor INTO my_vars; -- EXIT WHEN my_cursor%NOTFOUND; END LOOP; or, better is without FETCH: Code: FOR c IN my_cursor(params?) LOOP do_something; END LOOP;