Number of days between last pay and today

Mike Hughes

Registered User.
Local time
Today, 14:18
Joined
Mar 23, 2002
Messages
493
I'm looking to pickup the cases where the date last paid is greater than 60 days. Can someone help me

select id_case,
dt_last_pay
from noldba.case_rollup;
 
select id_case,
dt_last_pay
from noldba.case_rollup;
where datediff("d",DT_last_pay, Date()) > 60
 
I get an error ORA-00936 Missing Expression
 
Does the SQL you posted work?
 
select id_case,
dt_last_pay
from noldba.case_rollup;
where datediff("d",DT_last_pay, Date()) > 60

get rid of the semi colon after the word rollup and move it to the end of everything (after 60)
 

Users who are viewing this thread

Back
Top Bottom