getting ORA-01722: invalid number
Hello,
SELECT * from table t where
t.origin ='DXB' and t.destn ='BLR'
(trim(t.dow) is null or INSTR(t.dow, to_char('11-JUL-2011'-1,'D')) > 0);
Above SQL executes successfully.But when i try the same with different date value it throws ORA-01722:invalid number error.Below is the failed SQL.
SELECT * from table t where
t.origin ='BKG' and t.destn ='DXB'
(trim(t.dow) is null or INSTR(t.dow, to_char('29-JUN-2011'-1,'D')) > 0);
DOW is varchar column.
Oracle version:Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit
Please suggest.