I have a functional choice operator that has a where clause, in the where clause there is an instruction like this ...
to_date (camp.start_date, 'MM / DD / YYYY')> = to_date (: from_date, 'YYYY-MM-DD HH24: MI: SS')
However, if camp.start_date is NULL or has no rows, it throws an exception -
ORA-01858: A non-numeric character was found where the number is expected,
camp.start_date is actually VARCHAR2, which I need to convert to a date (yes, I know, it probably should be a date field, but I have no way to change this).
I tried something like this ...
to_date(NVL(camp.start_date,SYSDATE), 'MM/DD/YYYY') >=
to_date(:from_date, 'YYYY-MM-DD HH24:MI:SS')
Which still gives me an error. Also tried
camp.start_date null to_date (camp.start_date, "MM/DD/YYYY" ) >= to_date (: from_date, "YYYY-MM-DD HH24: MI: SS" )
. ? to_date , camp.start_date .