SQL Error: ORA-01861: literal does not match format string 01861

后端 未结 7 928
长情又很酷
长情又很酷 2020-11-29 04:33

I am trying to insert data into an existing table and keep receiving an error.

INSERT INTO Patient  
(
  PatientNo,
  PatientFirstName,
  PatientLastName,
           


        
相关标签:
7条回答
  • 2020-11-29 05:10
    ORA-01861: literal does not match format string
    

    This happens because you have tried to enter a literal with a format string, but the length of the format string was not the same length as the literal.

    You can overcome this issue by carrying out following alteration.

    TO_DATE('1989-12-09','YYYY-MM-DD')
    

    As a general rule, if you are using the TO_DATE function, TO_TIMESTAMP function, TO_CHAR function, and similar functions, make sure that the literal that you provide matches the format string that you've specified

    0 讨论(0)
提交回复
热议问题