Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2013
    Posts
    2

    Question Unanswered: Literal does not match format string

    Hi everyone ,

    I am new to this forum as well as sql and db

    I am receiving an error while try to inserting a value into a table which includes a date

    INSERT INTO Customer VALUES(001,'Jack','Park Street','Chicago','1955-07-04');

    The error is as follows :

    ERROR at line 1:
    ORA-01861: literal does not match format string

    Could anyone please help me to resolve this error

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    INSERT INTO Customer VALUES(001,'Jack','Park Street','Chicago', TO_DATE('1955-07-04','YYYY-MM-DD');
    or
    INSERT INTO Customer VALUES(001,'Jack','Park Street','Chicago', TO_DATE('1955-07-04','YYYY-DD-MM');

    depending upon which date is the right one; since existing string is indeterminate.
    Last edited by anacedent; 09-19-13 at 20:44.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Sep 2013
    Posts
    2

    Smile

    Thank You for your help , Issue solved

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •