SELECT ID, check_no, amount FROM payables UNION SELECT ID, check_no, amount FROM paychecks;
Regards, Gavin Towey -----Original Message----- From: Richard Reina [mailto:rich...@rushlogistics.com] Sent: Tuesday, February 09, 2010 9:23 AM To: mysql@lists.mysql.com Subject: query help I am trying to write a query that merges 2 columns from different tables and show them as one column of data. Something like the following. payables ID |check_no| amount| 3 |3478 | 67.00 | 4 |3489 | 98.00 | 8 |3476 | 56.00 | paychecks ID |check_no| amount 23 |3469 |498.00 | 34 |3502 |767.00 | 36 |3504 }754.00 | I am struggling to write a select query that gives me amounts and check numbers from both of the tables in the same column. Like the following: ID |check_no| amount| 3 |3478 | 67.00 | 4 |3489 | 98.00 | 8 |3476 | 56.00 | 23 |3469 |498.00 | 34 |3502 |767.00 | 36 |3504 }754.00 | Any help would be greatly appreciated. Thanks, Richard -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=gto...@ffn.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee, you are notified that reviewing, disseminating, disclosing, copying or distributing this e-mail is strictly prohibited. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any loss or damage caused by viruses or errors or omissions in the contents of this message, which arise as a result of e-mail transmission. [FriendFinder Networks, Inc., 220 Humbolt court, Sunnyvale, CA 94089, USA, FriendFinder.com