Perl Query Problem

Perl Query Problem

am 27.04.2004 05:10:47 von cslyon

OK, here is the layout.

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

=20
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

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




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 =20

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?


--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=3Dgcdmp-msql-mysql-modules @m.gmane.org