mrivero1961 (3/28/2013)
mrivero1961 (3/28/2013)
Sean Lange (3/28/2013)
This is MySql. If you want to join multiple queries together you probably need to use UNION.I really can't tell from what you have posted what the actual issue is here. I can try to help but without ddl (create table statements) and sample data (insert statements) it is pretty hard to figure out what is going on.
🙁
I need join the TABLE_LONG and TABLE_SHORT for in output the sum of number of events.
TABLE_SHORT
+--------+-----------+
| sGIG | NUMBER |
+--------+-----------+
| QI | 2 |
| QM | 2 |
| QO | 16 |
| QS | 6 |
| Tot | 26 |
+--------+-----------+
TABLE_LONG
+--------+--------+
| sGIG | NUMBER |
+--------+--------+
| QI | 9 |
| QM | 2 |
| QO | 6 |
| QS | 5 |
| Tot | 22 |
+--------+--------+
output:
+--------+--------+
| sGIG | NUMBER |
+--------+--------+
| QI | 11 |
| QM | 4 |
| QO | 22 |
| QS | 11 |
| Tot | 48 |
+--------+--------+
We keep going round'n'round because we don't actually know what your data looks like. Please see the article at the first link in my signature below for how to help us help you get the best answer. Thanks.
--Jeff Moden
Change is inevitable... Change for the better is not.