-
How do I insert a row in a table with comma using SQLPlus?
ex.
insert into mytable(description)
values('Spoon,Fork');
normally this will give ORA-01756: quoted string not properly terminated.
-
hmm
Code:
SQL> create table xyz (x varchar2(40));
Table created.
SQL> insert into xyz values ('abc,def');
1 row created.
SQL> commit;
Commit complete.
SQL> insert into xyz (x) values ('ghi,jkl');
1 row created.
SQL> commit;
Commit complete.
Jeff Hunter
-
Originally posted by edsperez
How do I insert a row in a table with comma using SQLPlus?
ex.
insert into mytable(description)
values('Spoon,Fork');
normally this will give ORA-01756: quoted string not properly terminated.
You must have mixed something up. You won't get ORA-1756 when your string contains comma - but you'll get this error if your string contains a single quote, like in
insert into mytable(description)
values('Spoon 'n Fork');
in such a case you have to replace single quote with two single quotes, like in:
insert into mytable(description)
values('Spoon ''n Fork');
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
He said comma, and his example has a comma: values('Spoon,Fork'); You know the duck-saying :-)
-
Originally posted by julian
He said comma, and his example has a comma: values('Spoon,Fork');
That's why i'm saying he must have mioxed something up. The quoted error message could not be a result of the example he provided - he probably ment a single qoute character, not a comma.
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Does anybody think it might be related to NLS variables, by any chance?
Jeff Hunter
-
I sincerily doubt this could be a NLS isue. I think it would be the best if edsperez could provide us with some real example where he encounters that error - like cut & paste the SQL and the accompanying error message from SQL*Plus session.
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
I think he is not anymore interested in 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|