Not sure if I should post this to beginners or not but there it goes.

I have 10+ tables with some of the same information in each in table of a mysql 
database. Here is an example:

 
Table 1
name            count
---------+-------
Widgets-A|      10 
Widgets-B|      5
Widgets-C|      10
Widgets-D|      5
Widgets-E|      15


Table 2
name            count
---------+-------
Widgets-A|      15 
Widgets-B|      5
Widgets-C|      10

      
 
Table 3
name            count
---------+-------
Widgets-D|      5
Widgets-E|      15     




I need to take the names and add the counts up for between each table and I am not 
sure how to make that happen. I would be able to do a select query so that the values 
are all in one query, like this:


name            count
---------+-------
Widgets-A|      10 
Widgets-B|      5
Widgets-C|      10
Widgets-D|      5
Widgets-E|      15
Widgets-A|      15 
Widgets-B|      5
Widgets-C|      10
Widgets-D|      5
Widgets-E|      15     

So, how to I get the values to look like in variable so that I can push them back into 
a new table:

New Table
name            count
---------+-------
Widgets-A|      25 
Widgets-B|      10
Widgets-C|      20
Widgets-D|      10
Widgets-E|      25

Any ideas?



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to