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: fetch in PL/SQL

Re: fetch in PL/SQL

From: Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl>
Date: Fri, 7 Aug 1998 08:40:56 +0200
Message-ID: <6qe7h7$1oi$1@newton.a2000.nl>


>Does anyone know how to (if at all possible) fetch, say 100 rows at a time,
>in a PL/SQL procedure.

No. Welll, maybe if you're selecting into PL/SQL tables. However, the main reason that in Pro*C you can fetch into an array, is to be able to process the data in pure C. So, collect the data all in a time and then have a pure C program process it. In PL/SQL you always can use SQL statements. Uhhh, well, I am not making myself very clear...

Anyway, why do you want to store the data into an array? Consider your tables as arrays! Just to be sure: you know about cursor fetch loops? Like

    cursor c_myTables is

        select *
        from all_tables;
    begin
        for r_myTable in c_myTables
        loop
            -- This loop will be executed for every row of your query.
            -- Simply refer to r_myTable.table_name etc.
        end loop;

    end;

Arjan. Received on Fri Aug 07 1998 - 01:40:56 CDT

Original text of this message

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