|
> CREATE TABLE ROB/TRANS (INVNO INT NOT NULL WITH DEFAULT, AMOUNT DEC (11 , 2) NOT NULL WITH DEFAULT) Table TRANS created in ROB. > INSERT INTO ROB/TRANS VALUES(1, 1) 1 rows inserted in TRANS in ROB. > INSERT INTO ROB/TRANS VALUES(1, 2) 1 rows inserted in TRANS in ROB. > INSERT INTO ROB/TRANS VALUES(2, 2) 1 rows inserted in TRANS in ROB. > INSERT INTO ROB/TRANS VALUES(2, 3) 1 rows inserted in TRANS in ROB. > Declare Global Temporary Table crTab as (Select InvNo,Sum(Amount) as Amt From Trans group by InvNo) with Data > select * from crTab SELECT statement run complete. ....+....1....+....2....+....3....+....4....+....5....+.. INVNO AMT 1 3.00 2 5.00 ******** End of data ******** Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.