Skip to content Skip to sidebar Skip to footer

Ora:00936 Missing Expression Error

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 time, r.rep_id, rt.re

Solution 1:

SELECT convert(DATE,r.created_dt) as created_dt

The issue is with the incorrect use of CONVERT function. Please see the documentation.

SQL>SELECTconvert(DATE,hiredate) as created_dt from emp;
SELECTconvert(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.

Post a Comment for "Ora:00936 Missing Expression Error"