This gives me error saying "select to_date(nvl(SUBSTR(126711 , 2 , 5) , '00179'), 'DDDYY') from dual : not found". I know the connection string is correct because that is used by other queries in the script.

Any help is appreciated. If there is a new approach to it, i can try that too. Please help ASAP.