Possible Duplicate:
Simple Oracle query: literal does not match format string
I am getting the following error:
INSERT INTO CatalogueEntry VALUES('2001-12-10', 2, 14.99, 1, 0)
ERROR at line 1: ORA-01861: literal does not match format string `
The first field is a DATE format.
Any ideas?
Thanks.
When you are inserting a string value to a date column, then you need to convert it to a date during the
INSERTusing theto_date()function. When using this function you will provide the format of the string.to_date()function format:So your query will be like this:
See SQL Fiddle with demo