I have a table in oracle with a text type column. This column stores dates in dd / mm / yyyy format and may or may not be filled.
I need to filter in that table and show only the records that have that field filled with a date less than or equal to today.
I've tried with this
select txt from table where txt is not null and type = 'date'
and TO_DATE(txt,
'DD/MM/YYYY') <= trunc(sysdate)
and with this
select * from (
select txt from table where txt is not null and type = 'date'
) t where TO_DATE(t.txt, 'DD/MM/YYYY') <= trunc(sysdate)
and in both cases I get an error ORA-01858.
How do I do it then to be able to filter in that way ??? in that field I can store information of different types: integers, dates, strings ... from there I filtered through the column where I indicate the type 'date'