Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Amit Saxena
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 th

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Deviloper
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

RE: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Stewart Anderson
> -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

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Dr.Ruud
"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

Re: Problems with the GnuPG::Interfaces Module in perl

2008-09-11 Thread sisyphus
On Sep 11, 1:15 am, [EMAIL PROTECTED] (Sebastian Cabrera) wrote: . . >I need some help with the GnuPG::Interfaces Module. I want > to use the "recv-keys" option You mean GnuPG::Interface ? (Perl is quantity-sensitive :-) I've just searched the GnuPG-Interface-0.36 documentation on CPAN, and there

RE: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Stewart Anderson
> -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 looking for a "fetch" function to fetch "n" number of record

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread jm
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

compiler output/global variable

2008-09-11 Thread Oliver Block
hello everybody, what may cause perl to give the following command line output Global symbol "$form" requires explicit package name at /.../Address.pm line 44. even if the variable $form is declared in line 16 as follows my $form = $self->formbuilder; within a sub of a class definit

Re: compiler output/global variable

2008-09-11 Thread Raymond Wan
Hi Oliver, You have to show more of the source code -- but it sounds like you've declared $form with "my" within a function/subroutine and it is not visible outside the function? Could that be the problem? Ray Oliver Block wrote: hello everybody, what may cause perl to give the followin

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Dr.Ruud
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

Retrieving Dataset along with REcordsets

2008-09-11 Thread jeevs
I understand a $stmt->execute($sql) will return me the recordset and I can fetch the records using fetchrow_hashref and other methods Howeveer I have a scenario where I get multiple datasets, ( Reason : My Stored Procedure calls other Stored PRocedures internally.) with individual record sets

Re: Octal code for "^L"

2008-09-11 Thread Moon, John
Please start a new thread when needed in this list. You have replied to a thread titled HTML::TreeBuilder help which was in turn a reply to Can not mix output of STDERR and STDOUT and those of us who have a threading email client, or can see the NNTP feed, see those topics as nested and ret

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Amit Saxena
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(

Re: trying to use regex(s) to clean up text

2008-09-11 Thread Albretch Mueller
On Wed, Sep 10, 2008 at 1:47 PM, Mr. Shawn H. Corey <[EMAIL PROTECTED]> wrote: > On Wed, 2008-09-10 at 07:12 -0700, [EMAIL PROTECTED] wrote: >> Re:An the solution is (Score:3, Interesting) >> Re:An the solution is (Score:5, Informative) >> Re:Its a pity that... (Score:4, Informative) >> Re:

Re: compiler output/global variable

2008-09-11 Thread John W. Krahn
Oliver Block wrote: hello everybody, Hello, what may cause perl to give the following command line output Global symbol "$form" requires explicit package name at /.../Address.pm line 44. even if the variable $form is declared in line 16 as follows my $form = $self->formbuilder;

talking to an IMAP server with perl

2008-09-11 Thread Bryan R Harris
I have a weird problem with our Lotus Notes IMAP server -- certain spam messages cause our email clients to not download that message, nor any subsequent ones. So I thought I'd write a perl script that I could run that would go onto the IMAP server and look for messages with the specific traits

Re: compiler output/global variable

2008-09-11 Thread Oliver Block
Hello Ray, Thanks for your response. I could already solve the problem. It was caused by a syntax error in a different line within the same sub.:-) I read my source code over and over and finally find the error. Best Regards, Oliver Block Am Donnerstag, 11. September 2008 16:30:49 schrieb Ra

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Dr.Ruud
"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()) >>> { >>

Re: LWP and authentication

2008-09-11 Thread ssinn
On Aug 22, 4:48 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: > ssinn wrote: > > > I am currently writing a script that will connect to a URL, > > authenticate itself and GET information to the site. > > I am using this code out of the Perl &LWPbook but it is failing. > > > #!/usr/bin/perl -w > > > use

Re: talking to an IMAP server with perl

2008-09-11 Thread Jeff Pang
2008/9/11 Bryan R Harris <[EMAIL PROTECTED]>: > > The question is, how hard is it to get perl to talk to an IMAP server? I've > done it via telnet, but that requires installing a module which I'd prefer > not to do unless I have to. >Are there any built-in modules that might help? > No. The cl

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Amit Saxena
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

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Raja Vadlamudi
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

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread dan
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

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Amit Saxena
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: >

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Amit Saxena
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

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread dan
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

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Amit Saxena
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 > >

Re: trying to use regex(s) to clean up text

2008-09-11 Thread Deviloper
There are online RegEx-Utilities that helps you building regex. There are some modul with many common regex to steal from or just import. (Regexp::Common) And there is ActiveState Perl Editor with a 30 Trail and a great "realtime" RegEx-Tool and Debugger. If nothing else helps take a look at per

Re: talking to an IMAP server with perl

2008-09-11 Thread Deviloper
There are a LOT of Moduls at cpan to talk with IMAP-Accounts & Servers, so I guess developing a tool with your needs should not be such a large problem. (You don´t have to tell your boss.) (Some of this moduls only do the basic stuff.) http://search.cpan.org/author/MARKOV/Mail-IMAPClient-3.10/l

Re: Fetching "n" number of records at a time in Perl DBI !

2008-09-11 Thread Raymond Wan
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