I want to select in SQL a record from my oracle table based on a fromDate and toDate variables.
I'm having troubles with the where clause because the TIMESTMP column is declared :
CREATE TABLE SCHEMA.LOGGING_EVENT
(
TIMESTMP NUMBER(20) NOT NULL,
[...]
How should the query be?
Additional info: fromDate and toDate will arrive from a java backend while instead the TIMESTMP column is populated by logback (DBAppender) and can't be changed in format or type.
my try (doesn't work):
select * from LOGGING_EVENT LE
where LE.TIMESTMP>= to_number('12-01-2012 21:24:00', 'dd-mm-yyyy hh24:mi:ss')
AND LE.TIMESTMP<= to_number('12-01-2023 21:24:00', 'dd-mm-yyyy hh24:mi:ss');
Thanks