I am getting error in the second script. Please explain why i am getting error in the second script.
select count(*) from LCL_SHR_IncidentIntegrationInt where externalsystem = 'IPSOFT' and (to_char(sysdate,'YYYYMMDDHH24MISS')-to_char(fn_adjusted_date(CREATE_DATE),'YYYYMMDDHH24MISS')) > 180;
O/P : 122797
select count(*) from LCL_SHR_IncidentIntegrationInt where externalsystem = 'IPSOFT' and (to_char(sysdate,'DD-MM-YYYY HH24:MI:SS')-to_char(fn_adjusted_date(CREATE_DATE),'DD-MM-YYYY HH24:MI:SS')) > 180;
O/P : ORA-01722: invalid number 01722. 00000 - "invalid number" *Cause: The specified number was invalid. *Action: Specify a valid number.