Msgstr "the quoted line is incomplete" sqlplus
Getting error when trying 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 is not properly terminated
Your question has smart quotes in SQL instead of basic single quotes. Try the following:
INSERT INTO PRODUCT(PRODUCT_NUM, ITEM_NUM, DATE)
VALUES ('11', '19', DATE '2001-01-01')
(I prefer the keyword date
for specifying date constants in Oracle.)
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 the wrong quote type
This is almost certainly because you are using the wrong quote types, which often happens when you cut text from a word processor.
Your example has "angle" quotation marks, not the correct one '
, meaning that either the real problem is or is not written correctly, which makes me think you are not agreeing with the quotation marks correctly.
This is what you need:
INSERT INTO PRODUCT (PRODUCT_NUM, ITEM_NUM, DATE)
VALUES ('11','19', TO_DATE('01-JAN-2001','DD-MON-YYYY'));
use a regular quote, your quote seems strange.