Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calculate SUM of Positive and Negative Values

906603Dec 20 2011 — edited Dec 20 2011
Hi - I have a SQL where in I want to calculate Sum of positive and negative values, for example

Column1 Column2

Pay 50
Deduct -10
Pay 50
Deduct -10

So when I calculate Sum for row2 answer should be 80 --(50+(-10)+50+(-10)), can you give me syntax for above

Edited by: 903600 on Dec 20, 2011 2:39 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 17 2012
Added on Dec 20 2011
2 comments
1,509 views