Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Handling mutiple rows

by Anonymous Monk
on Sep 09, 2012 at 15:56 UTC ( #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

Comment on Handling mutiple rows
Re: Handling mutiple rows
by Anonymous Monk on Sep 09, 2012 at 17:06 UTC
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"

Re: Handling mutiple rows
by NetWallah (Abbot) 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

Log In?
Username:
Password:

What's my password?
Create A New User
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? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-10-22 01:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls