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
> -Original Message-
> From: Amit Saxena [mailto:[EMAIL PROTECTED]
> Sent: 11 September 2008 12:53
> To: Perl Beginners
> Cc: Amit Saxena
> Subject: Fetching "n" number of records at a time in Perl DBI !
>
> Hi all,
>
> I am looking for a "fetch" function to fetch "n" number of records at
"Amit Saxena" schreef:
> I am looking for a "fetch" function to fetch "n" number of records at
> a time in Perl DBI !
If $max_rows is defined and greater than or equal to zero then it is
used
to limit the number of rows fetched before returning.
fetchall_arrayref() can then be called again to fe
> -Original Message-
> From: Dr.Ruud [mailto:[EMAIL PROTECTED]
> Sent: 11 September 2008 14:01
> To: beginners@perl.org
> Subject: Re: Fetching "n" number of records at a time in Perl DBI !
>
> "Amit Saxena" schreef:
>
> > I am loo
there is a LIMIT option for the SELECT statement that will return the
number of records you desire.
$sth = $dbh->prepare("select from LIMIT ");
$sth->execute();
while ($vars ...) = $sth->fetchrow_array())
{
}
# or whatever syntax best suits your preferences
On Thu, Sep 11, 2008 at 6:53 AM, A
jm schreef:
> there is a LIMIT option for the SELECT statement that will return the
> number of records you desire.
>
> $sth = $dbh->prepare("select from arguments> LIMIT ");
> $sth->execute();
>
> while ($vars ...) = $sth->fetchrow_array())
> {
> }
> # or whatever syntax best suits your prefer
On Thu, Sep 11, 2008 at 8:01 PM, Dr.Ruud
<[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> wrote:
> jm schreef:
>
> > there is a LIMIT option for the SELECT statement that will return the
> > number of records you desire.
> >
> > $sth = $dbh->prepare("select from > arguments> LIMIT ");
> > $sth->execute(
"Amit Saxena" schreef:
> Dr.Ruud:
>> jm:
>>> there is a LIMIT option for the SELECT statement that will return
>>> the number of records you desire.
>>>
>>> $sth = $dbh->prepare("select from >> arguments> LIMIT ");
>>> $sth->execute();
>>>
>>> while ($vars ...) = $sth->fetchrow_array())
>>> {
>>
On Fri, Sep 12, 2008 at 12:01 AM, Dr.Ruud
<[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> wrote:
> "Amit Saxena" schreef:
> > Dr.Ruud:
> >> jm:
>
> >>> there is a LIMIT option for the SELECT statement that will return
> >>> the number of records you desire.
> >>>
> >>> $sth = $dbh->prepare("select from
On Thu, Sep 11, 2008 at 11:12 PM, Amit Saxena <[EMAIL PROTECTED]>wrote:
> On Fri, Sep 12, 2008 at 12:01 AM, Dr.Ruud
> <[EMAIL PROTECTED] <[EMAIL PROTECTED]><
> [EMAIL PROTECTED] <[EMAIL PROTECTED]>>
> > wrote:
>
> > "Amit Saxena" schreef:
> > > Dr.Ruud:
> > >> jm:
> >
> > >>> there is a LIMIT opti
On Thu, 11 Sep 2008 17:23:22 +0530, Amit Saxena <[EMAIL PROTECTED]>
wrote:
> Hi all,
>
> I am looking for a "fetch" function to fetch "n" number of records at a
> time
> in Perl DBI !
I had to do this kind of thing to implement 'record paging' in
Gtk2::Ex::DBI. The way I did it was in a couple o
On Fri, Sep 12, 2008 at 9:36 AM, Raja Vadlamudi <[EMAIL PROTECTED]> wrote:
>
>
> On Thu, Sep 11, 2008 at 11:12 PM, Amit Saxena <[EMAIL PROTECTED]>wrote:
>
>> On Fri, Sep 12, 2008 at 12:01 AM, Dr.Ruud
>> <[EMAIL PROTECTED] <[EMAIL PROTECTED]><
>> [EMAIL PROTECTED] <[EMAIL PROTECTED]>>
>> > wrote:
>
On Fri, Sep 12, 2008 at 9:53 AM, dan <[EMAIL PROTECTED]> wrote:
> On Thu, 11 Sep 2008 17:23:22 +0530, Amit Saxena <[EMAIL PROTECTED]>
> wrote:
>
> > Hi all,
> >
> > I am looking for a "fetch" function to fetch "n" number of records at a
> > time
> > in Perl DBI !
>
> I had to do this kind of thing
On Fri, 12 Sep 2008 10:24:58 +0530, Amit Saxena wrote:
> The only issue with this approach is that two queries needs to be run
> for the same.
>
> Considering the tables containing 1 million (and more) rows, this two
> pass approach will not be good.
>
> What others say ?
It's precisely becaus
On Fri, Sep 12, 2008 at 10:52 AM, dan <[EMAIL PROTECTED]> wrote:
> On Fri, 12 Sep 2008 10:24:58 +0530, Amit Saxena wrote:
>
> > The only issue with this approach is that two queries needs to be run
> > for the same.
> >
> > Considering the tables containing 1 million (and more) rows, this two
> >
Hi Amit,
Generally, what Dan says is correct, but his suggestion isn't *the*
answer that will work for everyone. He is correct about the size of a
data column and the problem of retrieving all of the data. Also, an
index is usually build on the primary key, so the first fetch should be
fas
dan schreef:
> Amit Saxena:
>> I am looking for a "fetch" function to fetch "n" number of records
>> at a time in Perl DBI !
>
> I had to do this kind of thing to implement 'record paging' in
> Gtk2::Ex::DBI. The way I did it was in a couple of steps.
>
> 1) Run a query to *only* select primary ke
17 matches
Mail list logo