vivekvp has asked for the wisdom of the Perl Monks concerning the following question:
Thanks, V He who laughs last, doesn't get the joke.### Perform the connection using the Informix driver + my $dbh = DBI->connect( "dbi:Informix:nps\@sumitt_aaa","netsite","Ppol +0699" ,\%attr )or die "Can't connect to database: ", $DBI::errstr, "\n"; + + $sth=$dbh->prepare("select det_number,det_ccode,head_date from podetai +l a,pohead er b where det_number=head_number and head_date>'2002/01/01'"); + + $sth->execute(); + # will dump out all fields $data=$sth->dump_results(); + #$data=$sth->dump_results(); + + while ( ($po, $ccode,$head_date) = $sth->fetchrow_arr +ay() ){ #print " $po $ccode, $head_date \n"; + push (@po,$po); + + } + $sth->finish; + + $p_str=@po; + print "# of POs: $p_str \n"; + *********TAKES WAY TOO LONG IN HERE ****************** foreach $po(@po) { + for ($count=0; $count<=$i;$count++) { + $sth=$dbh->prepare("select det_number from podetail a, poheade +r b where det_ccode=? and head_date>'2002/01/01' and det_number=?"); + #print "old cc: $old[$count], PO checked: $po \n"; + $sth->execute($old[$count],$po); + $p_str=$sth->fetchrow_array(); + if ($p_str) { + push (@p_str,$p_str); + print "$p_str \n"; + } + $sth->finish; + } + } ********** +*********************
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: VVP:Faster DBI'ing?
by Zaxo (Archbishop) on Mar 12, 2002 at 16:11 UTC | |
|
Re: VVP:Faster DBI'ing?
by rdfield (Priest) on Mar 12, 2002 at 16:01 UTC | |
by Kanji (Parson) on Mar 12, 2002 at 16:27 UTC | |
by rdfield (Priest) on Mar 12, 2002 at 16:34 UTC | |
|
Re: VVP:Faster DBI'ing?
by derby (Abbot) on Mar 12, 2002 at 16:01 UTC | |
|
Re: VVP:Faster DBI'ing?
by krazken (Scribe) on Mar 12, 2002 at 16:07 UTC | |
|
Re: VVP:Faster DBI'ing?
by mpeppler (Vicar) on Mar 12, 2002 at 17:30 UTC | |
|
Re: VVP:Faster DBI'ing?
by vivekvp (Acolyte) on Mar 12, 2002 at 17:22 UTC |