Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL help needed

Re: PL/SQL help needed

From: Venki Ramachandran <venkir_at_wacsinc.com>
Date: Mon, 23 Jul 2001 13:45:13 -0700
Message-ID: <3B5C8CD8.95D0788D@wacsinc.com>

You should get a PL/SQL book as this is a very simple code you will find in any book, BUt a simple sample would be:

cursor cursor_name IS
select col1, col2 from tab1 where condtions;

For new_rec in cursor_name
loop
count := count + 1

IF count = 100 then
count := 0;
 ...
..
do your stuff here

end if;
end loop;

Hope that helps.

-VR

Tony Walby wrote:

> Here is the problem I need to gather data from a table 100 records a a
> time. I need to select 0 -100 then 101 - 200 and so forth I know between
> does not work when using rownum. Plus I see other problems with rownum.
> I was thinking of a cursor with a counter but I do not know how to write
> the pls/sql block any help will be greatly appreciated.
>
> Tony Walby
  Received on Mon Jul 23 2001 - 15:45:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US