Re: SQL Question, first 50 of a query

From: John Homeyard <homeyard_at_worldnet.att.net>
Date: 1996/05/22
Message-ID: <4ntmir$bhu_at_mtinsc01-mgt.ops.worldnet.att.net>#1/1


A variation of this might work for you:

accept p_rows_wanted
declare
  v_rows_wanted number(2) :=p_rows_wanted;   v_my_variable number(2);
  cursor my_cursor is
    select column
     from my_table;
Begin

   open my_cursor;
   fetch my_cursor into v_my_variable
    while my_cursor%rowcount <= v_rows_wanted       and my_cursor%found loop
...
...

   end loop;
   close my_cursor;
end; Received on Wed May 22 1996 - 00:00:00 CEST

Original text of this message