This is a good solution except for one small syntactical error ... very easy to make. The code should read:
Code:
SELECT TO_DATE( CASE WHEN TO_NUMBER( TO_CHAR( SYSDATE,'MM') ) IN ( 10, 11, 12 )
THEN '1-Oct-' || TO_CHAR(SYSDATE,'YYYY')
ELSE '1-Oct-' || TO_CHAR( TO_NUMBER( TO_CHAR(SYSDATE,'YYYY') ) - 1 )
END ) As FiscalYearStart
Because I work so much in SS, I did not catch the concatenation part at first. Oracle uses double pipe symbols vs. "+" for concatenation.
Just the same, I really appreciate your help!
