I am currently working on a query where I have a table with columns
--------------------------------------------------------------------------------
EID(number) ENAME(varchar2) HIRE_DATE(varchar2)
101 PaulJones 20120104
102 DavidSmith 27-JAN-1995
103 BellaSwan 15May2020 05:30:00
Expected Output :
EID ENAME HIRE_DATE VALID_DATE
101 PaulJones 20120104 False
102 DavidSmith 27-JAN-1995 True
103 BellaSwan 15May2020 05:30:00 False
So David has true on the Valid_date column because his hire_date matches the default format of ORACLE date() function.
I was trying to use:
SELECT EID, ENAME,
(CASE
WHEN ISDATE(HIRE_DATE)=1 THEN 'TRUE'
ELSE 'FALSE'
END) AS VALID_DATE
FROM EMP_INFO2;
Error :
ISDATE() invalid identifier.
I think this function does not work in Oracle. Any other alternatives?