Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Computing difference of column sums
Hi, I'm looking for a means to solve the following problem in sqlplus :
I have the following columns :
Account Debit Credit ===== ==== ==== a/c1 10 20 a/c1 15 25 Sum 25 45 <- Line calculated in a break ...compute statement
Now, I want to calculate the difference between the sum of debit and the sum of credit and display it underneath. The finality of that is to find an account where sum(debit) is different from sum(credit)
How can I do that ? Thanks for helping me. Please also reply to shameemg_at_club-internet.fr Received on Sat Jun 05 1999 - 17:43:29 CDT