Hello,
I have this query in DB2
SELECT * FROM DTINBS WHERE DTDCR = DAYS(CURRENT_DATE) - 1
The format for the where clause should be in YYYYMMDD for it work properly. If I change this query this
SELECT * FROM DTINBS WHERE DTDCR = 20120322 - 1
Everything works no problem, but I should be able to get today's date and subtract one day.
Any help will be appreciate it.
Thank you.
I have this query in DB2
SELECT * FROM DTINBS WHERE DTDCR = DAYS(CURRENT_DATE) - 1
The format for the where clause should be in YYYYMMDD for it work properly. If I change this query this
SELECT * FROM DTINBS WHERE DTDCR = 20120322 - 1
Everything works no problem, but I should be able to get today's date and subtract one day.
Any help will be appreciate it.
Thank you.