Hi,
I have to get the previous three year-month of actual date but I have a problem for the beginning of the year and this is because I define the erroneus query.
I mean:
I've written this query
SELECT TO_CHAR(SYSDATE,'YYYYMM')-1, TO_CHAR(SYSDATE,'YYYYMM')-2, TO_CHAR(SYSDATE,'YYYYMM')-3
FROM DUAL;
in order to get (on March):
201502, 201501, 201412
but unfortunately I get:
201502, 201501, 201500
Can you help me?
Thanks in advance!