Everyone, Im trying to INSERT the SUM of the two data from table TEMP_IN and TEMP_OUT
TEMP_IN data select * from temp_in limit 15 -------------- +--------------+ | cal | +--------------+ | 000000014.45 | | 000000013.95 | | 000000015.95 | | 000000016.78 | | 000000018.92 | | 000000015.78 | | 000000015.17 | | 000000018.28 | | 000000020.34 | | 000000015.09 | | 000000015.06 | | 0000000017.2 | | 000000017.98 | | 000000017.31 | | 0000000019.2 | +--------------+ 15 rows in set (0.00 sec) mysql> TEMP_OUT data select * from temp_out limit 15 -------------- +--------------+ | cal | +--------------+ | 000000014.23 | | 000000013.62 | | 000000013.17 | | 000000012.87 | | 0000000010.5 | | 000000014.12 | | 0000000014.5 | | 0000000012.2 | | 000000013.17 | | 000000013.87 | | 000000014.31 | | 000000014.37 | | 000000013.39 | | 000000012.75 | | 000000014.06 | +--------------+ 15 rows in set (0.00 sec) mysql> how can make a query that insert the SUM of TEMP_IN+TEMP_OUT and I want it to be INSERTED to TEMP_SUM table? Here's my table definition.. -> ; -------------- desc temp_sum -------------- +-------+-------------------------+------+-----+--------------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------------------+------+-----+--------------+-------+ | cal | float unsigned zerofill | | | 000000000000 | | +-------+-------------------------+------+-----+--------------+-------+ 1 row in set (0.00 sec) mysql> desc temp_in; -------------- desc temp_in -------------- +-------+-------------------------+------+-----+--------------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------------------+------+-----+--------------+-------+ | cal | float unsigned zerofill | | | 000000000000 | | +-------+-------------------------+------+-----+--------------+-------+ 1 row in set (0.00 sec) mysql> mysql> desc temp_sum; -------------- desc temp_sum -------------- +-------+-------------------------+------+-----+--------------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------------------+------+-----+--------------+-------+ | cal | float unsigned zerofill | | | 000000000000 | | +-------+-------------------------+------+-----+--------------+-------+ 1 row in set (0.00 sec) mysql> is it possible to make it as a query?...I can make it programmatically but...is there a short way to make? R.B.Roa PhilCom Corporation Tel. No. 858-xxxx Mobile No. (63) (919-xxxxxxx) --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php