Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Handling mutiple rows

by Anonymous Monk
on Sep 09, 2012 at 15:56 UTC ( [id://992596]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am a beginner in perl.Please help in the following requirement.I am asked to query the database which will return multiple rows..For eg consider the below mentioned table in DB:

company name account month

X E200 Jan

Y E200 Feb

1 E300 Jan

I need to first get the details from the above table where company name not betwee "0" and "9".So this will retreieve first 2 rows.Then i need to process each rows taking company name and querying database again.For eg : X returns 2,4,5 from database.So i need to create a temporary table lik gievn below

company name account month

2 E200 Jan

4 E200 Jan

5 E200 Jan

Y E200 Feb

1 E300 Jan

like that i shud do for company name=Y also..Pleas helpp

Replies are listed 'Best First'.
Re: Handling mutiple rows
by Anonymous Monk on Sep 09, 2012 at 17:06 UTC
Re: Handling mutiple rows
by NetWallah (Canon) on Sep 09, 2012 at 20:10 UTC
    Welcome to the monastery, Ammu.

    Please see my response to your question looping in a hashtable.
    Thinking about that will help you resolve this issue as well.

                 I hope life isn't a big joke, because I don't get it.
                       -SNL

Re: Handling mutiple rows
by Kenosis (Priest) on Sep 09, 2012 at 19:43 UTC

    I am asked to query the database...

    Do you have a Perl question?

      Do you have a Perl question?

      Sure he does "Please helpp"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://992596]
Approved by chacham
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-26 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found