Oracle CASE missing keyword error ? - TechRepublic
Question
June 2, 2011 at 06:53 AM
ratface

Oracle CASE missing keyword error ?

by ratface . Updated 15 years ago

When trying to run a piece of code I get ora-00905 missing keyword
I marked the line that gives thw error. Thanks

code:
(CASE
WHEN (EOQ) – ((CASE ps.payment_schedule_date
When ‘00000000’
then TO_DATE(To_NUMBER(pl.pledge_year_of_giving + 5)||’0630′,’YYYY/MM/DD’)
Else TO_DATE(ps.payment_schedule_date,’YYYY/MM/DD’)
end)) < to_char(180) THEN -- ++++++++++++++++++++++++++++++ ERROR HERE round(ps.payment_schedule_balance*(pl.pledge_amount/pp.prim_pledge_amount),12) amount END ) 'Current' , (CASE WHEN (EOQ) - ((CASE ps.payment_schedule_date When '00000000' then TO_DATE(To_NUMBER(pl.pledge_year_of_giving + 5)||'0630','YYYY/MM/DD') Else TO_DATE(ps.payment_schedule_date,'YYYY/MM/DD') end)) between to_char(180) and to_char(365)then ' 6 months - 1 Yr Past Due' END ), (CASE WHEN (EOQ) - ((CASE ps.payment_schedule_date When '00000000' then TO_DATE(To_NUMBER(pl.pledge_year_of_giving + 5)||'0630','YYYY/MM/DD') Else TO_DATE(ps.payment_schedule_date,'YYYY/MM/DD') end)) between to_char(366) and to_char(730) THEN '1 Yr - 2 Yrs Past Due' END) , (CASE WHEN (EOQ ) - ((CASE ps.payment_schedule_date When '00000000' then TO_DATE(To_NUMBER(pl.pledge_year_of_giving + 5)||'0630','YYYY/MM/DD') Else TO_DATE(ps.payment_schedule_date,'YYYY/MM/DD') end)) > to_char(730) THEN ‘2 Yrs – 3 Yrs Past Due’
END)

This discussion is locked

All Comments