Jul 23, 2001 #1 Saumya Programmer Dec 15, 2003 1 IN Hi, I am using cursors in SQL server.it is running but its returning each row one by one,how do i make it return a batch of rows??? thankx in advance.
Hi, I am using cursors in SQL server.it is running but its returning each row one by one,how do i make it return a batch of rows??? thankx in advance.
Jul 23, 2001 #2 Tim1 Programmer Mar 27, 2001 242 GB Hiya, To return multiple rows through a cursor, you need to use the command: SET CURSOR ROWS number FOR cursor_name For example, using a cursor get_name, if you want to get 10 rows each time, you would use: SET CURSOR ROWS 10 FOR get_name HTH Tim Upvote 0 Downvote
Hiya, To return multiple rows through a cursor, you need to use the command: SET CURSOR ROWS number FOR cursor_name For example, using a cursor get_name, if you want to get 10 rows each time, you would use: SET CURSOR ROWS 10 FOR get_name HTH Tim