i have the following query which does not retrieve data even though there is:
select *
from INTERFACE_RUN
where TO_CHAR(INTERFACE_RUN.START_TIME, 'dd-mon-yy') = '04-MAY-10';
The start_time field is a timestamp field. Hence I converted it using to_char and compared with the user passed value of 04-MAY-10. But it did not fetch any data. Any help please. Thanks in advance
to_dateto convert timestamp to date.SELECT TO_CHAR(INTERFACE_RUN.START_TIME, 'dd-mon-yy') FROM INTERFACE_RUNshow the values you expect?SELECT TO_CHAR(INTERFACE_RUN.START_TIME, 'dd-mon-yy') FROM INTERFACE_RUNdoes not return any row? Then your table is clearly empty, there's no way a WHERE clause can change that. Please double-check you're connecting to the correct server and database and typing the correct table name.