"quoted string not properly terminated" sqlplus

13,509

Solution 1

Your question has "smart" quotes in the SQL instead of basic single quotes. Try this:

INSERT INTO PRODUCT(PRODUCT_NUM, ITEM_NUM, DATE)
    VALUES ('11', '19', DATE '2001-01-01')

(I prefer the date keyword for specifying date constants in Oracle.)

Solution 2

INSERT INTO PRODUCT (PRODUCT_NUM, ITEM_NUM, DATE)
VALUES ('11','19', TO_DATE('01-JAN-2001','DD-MON-YYYY'));

use this code as you used wrong quote type

Solution 3

It's almost certainly because you're using the wrong quote types, something that often happens when you cut'n'paste text from a word processor.

Your example has "angled" quotes rather than the correct ' variant, meaning that either that's the actual problem, or that you've transcribed it incorrectly which leads me to think you're not matching quotes correctly.

This is what you should have:

INSERT INTO PRODUCT (PRODUCT_NUM, ITEM_NUM, DATE)
    VALUES ('11','19', TO_DATE('01-JAN-2001','DD-MON-YYYY'));

Solution 4

use a normal quote, your quote seems to be odd.

Share:
13,509
user3315642
Author by

user3315642

Updated on June 09, 2022

Comments

  • user3315642
    user3315642 almost 2 years

    Getting an error when I try to insert values using the following statement

    INSERT INTO PRODUCT (PRODUCT_NUM, ITEM_NUM, DATE)
    VALUES (’11’,’19’, TO_DATE(’01-JAN-2001’,’DD-MON-YYYY’));
    

    ERROR:
    ORA-01756: quoted string not properly terminated