ORA-01722
Hi All,
we have a query like below.
while this query is working fine on one database it is getting ORA-01722 (red piece) on another database. nls_parameters are same both database. What could be the problem ?
Regards.
select distinct 0 as c1,
D1.c2 as c2,
D1.c1 as c3
from
(select count(1) as c1,
TRUNC((TO_NUMBER(TO_CHAR(sysdate, 'DDD'), '999') - TO_NUMBER(TO_CHAR(sysdate, 'D'), '99') + 13) / 7) as c2
from
dual
group by TRUNC((TO_NUMBER(TO_CHAR(sysdate, 'DDD'), '999') - TO_NUMBER(TO_CHAR(sysdate, 'D'), '99') + 13) / 7)
) D1
order by c2
0