Tuesday, January 17, 2012

error "ORA-01861 literal does not match format string"

Hacks and Workarounds
Debugging issues seen during purge script execution
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Issue1 :(Generic)
error "ORA-01861 literal does not match format string"

Solution:
date format giving in your purge script may be wrong please check for the correct format as listed below.

min_creation_date := to_timestamp('2010-01-01','YYYY-MM-DD');
max_creation_date := to_timestamp('2010-01-31','YYYY-MM-DD');
retention_period := to_timestamp('2010-01-31','YYYY-MM-DD');

or like this

MIN_CREATION_DATE timestamp := TIMESTAMP'2011-09-19 02:00:00';
MAX_CREATION_DATE timestamp := TIMESTAMP'2011-09-20 00:00:00';

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

=================================================================
Disclaimer: The views expressed on this blog are solely our own and do not necessarily reflect the views of Oracle.
=================================================================

No comments:

Post a Comment