Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL help needed
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
![]() |
![]() |