I guess thats a task you can achieve with the correct sql-statement.
Have a look at http://www.adp-gmbh.ch/ora/sql/examples/first_rows.html.
How you can implement an sql-query that give you the results you need,
depends on how the data in your db looks like. If you have a fixed index number
for each row you could start fetching rows with WHERE INDEX > 1 AND INDEX <
10, then the next time WHERE INDEX > 10 AND INDEX < 20... or something like
that...
Actually I am not an SQL-Crack... nor a db-freak.
Bye,
Bo
Amit Saxena <[EMAIL PROTECTED]> hat am 11. September 2008 um 13:53 geschrieben:
> Hi all,
>
> I am looking for a "fetch" function to fetch "n" number of records at a time
> in Perl DBI !
>
> "fetchrow_hashref" fetches one row at a time whereas "fetchall_hashref"
> fetches all the rows at a time.
>
> The requirement is to get 100 records at a time (in array or hash) before
> printing it into the output file.
>
> I don't want to use following style ;-
>
> my $count=0;
> while ($href1 = $sth->fetchrow_hashref())
> {
> my @arr1 = ();
> $count = $count + 1;
> %arr1 = %$href1;
> if ($count == 100)
> {
> # print to the output file
> print PTR %arr1;
> }
> }
>
> Thanks & Regards,
> Amit Saxena