I need to displays the previous year in character format.
SELECT
TO_CHAR(TO_NUMBER(SYSDATE,'yyyy')-1),'YYYY')
FROM
dual
i'm trying to subtract 1 from a character string,I get an error msg stating
"FROM keyword not found where expected".
Please advice...thank you.
SELECT
TO_CHAR(TO_NUMBER(SYSDATE,'yyyy')-1),'YYYY')
FROM
dual
i'm trying to subtract 1 from a character string,I get an error msg stating
"FROM keyword not found where expected".
Please advice...thank you.