PL/SQL (MOSC)

MOSC Banner

Summation not working

edited Jan 23, 2014 1:36AM in PL/SQL (MOSC) 10 commentsAnswered
I am trying to do the sum below but the 3rd decode is not giving me anything.  Could anyone help please.
SUM(DECODE(aia.PAYMENT_STATUS_FLAG,'N',nvl(aia.BASE_AMOUNT,aia.INVOICE_AMOUNT)
             DECODE(aip.INVOICE_PAYMENT_ID,NULL,nvl(aia.BASE_AMOUNT,aia.INVOICE_AMOUNT),0)
             ,decode(aia.PAYMENT_STATUS_FLAG,'P',aps.amount_remaining)))

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center