Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

literal does not match format string

664264Oct 20 2008 — edited Oct 20 2008
Hi all,

In a pl/sql query I have got this error ORA-1861: literal does not match format string.

The line that I am getting this error is the following:

ELSIF r.activity_date_query <> r.activity_date_response

At this line r is the current record of a cursor. activity_date_query(of type date) and activity_date_response(of type varchar2) are two different columns in the cursor.

As far as I know I should get this error if I convert a string to a date with a wrong format string, for example

SELECT to_date('20041308','yyyy/mm/dd')
FROM dual;

produces this error.

Shouldn't I get some other error like type missmatch? Why is the error type literal does not match format string? Can somebody help?

Thanks in advance,
suleyman
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2008
Added on Oct 20 2008
7 comments
871 views