I\'m getting ORA:00936 error for the following query.Please let me know the issue in the query
SELECT convert(DATE,r.created_dt) as created_dt,
r.created_dt as t
SELECT convert(DATE,r.created_dt) as created_dt
The issue is with the incorrect use of CONVERT function. Please see the documentation.
SQL> SELECT convert(DATE,hiredate) as created_dt from emp;
SELECT convert(DATE,hiredate) as created_dt from emp
*
ERROR at line 1:
ORA-00936: missing expression
SQL>
I guess you are trying convert the datatype, you could use TO_DATE to convert string into date. Or, TO_CHAR to do vice-versa.