Re: looping



On Mon, Jun 30, 2008 at 3:24 PM, dakin999 <akhilshri@xxxxxxxxx> wrote:


While I am reading each row data that is fetched by select query from
oracle databae, I need to read some other values from a text file.
This is where I am having issues. Can some one help me in formalising
the write syntax (code) for doing these two thengs.

DBI has fetchrow_arrayref and fetchrow_hashref methods, you may check those.
The code logic could be:

while(my $ref = $sth->fetchrow_hashref) {
my $cond = get_another_condition($ref);
handle_it($ref,$cond);
}

sub get_another_condition {
my $r = shift;
open FD,"original.txt" or die $!;
# read from FD and do something with $r;
close FD;
# return something;
}


--
Regards,
Jeff. - Peng.Kyo@xxxxxxxxx
.



Relevant Pages

  • Re: optimizer behaviour changed
    ... Given you have also done an order by which is not in the select list - the server must build an index to reorder the data which he is reading directly from the index. ... QUERY PLAN FOR STATEMENT 1. ... Using I/O Size 2 Kbytes for index leaf pages. ... With LRU Buffer Replacement Strategy for index leaf pages. ...
    (comp.databases.sybase)
  • Re: Programming in standard c
    ... may grow larger between the query and the reading. ... That wider programming environment can provide guarantees ... and learned my craft in the days when memory was ...
    (comp.lang.c)
  • Re: Continuous Form and Query
    ... That makes more sense than the way I was reading it. ... I set my query up to look like this in sql: ... Barry Gilbert wrote: ... "Wes H." ...
    (microsoft.public.access.forms)
  • Re: CRIT: Eyes Query
    ... has a grudge against mothers who do illegal gene-splicing on their own ... readers are reading has a tendency to really grab my attention. ... published writers posted successful query letters, ... favour when I see a weakness and ignore it - because I want to see you ...
    (rec.arts.sf.composition)
  • Re: What happens when data in control is updated
    ... and been reading about 'recordsets'.... ... predecessor query which used yet another query (the one i coined ... could assign/pass it in to the query when i wrote it as expressed in my SQL ... >> control whilst the user is contuing to use/view the information on ...
    (microsoft.public.access.formscoding)