DB2:
WHERE ENTERED_DATE BETWEEN CURRENT DATE - (DAY(CURRENT DATE) - 1) DAYS AND CURRENT DATE;
or
WHERE ENTERED_DATE BETWEEN SYSDATE - (DAY(SYSDATE) - 1) DAYS AND SYSDATE;
Oracle:
WHERE ENTERED_DATE BETWEEN TRUNC(SYSDATE, 'mm') AND SYSDATE;
or
WHERE ENTERED_DATE BETWEEN TRUNC(SYSDATE, 'month') AND SYSDATE;
No comments:
Post a Comment