Home » questions » Using Oracle, how do I insert a text field with an embedded ';' value.?
Using Oracle, how do I insert a text field with an embedded ';' value.?
I have a table with several text fields. I am trying to insert text in one of those fields that includes new lines and a semicolon ';'. SQLPLUS interprets the the semicolon as the end of the command, and reports an error:
SQL> insert into mytable values ('
field;
', 'field2');
ORA-01756: quoted string not properly terminated.
Escaping with field'';'' eliminates the error, but leaves the value as "field';'", which is not what I want. Escaping with '\' does not help. How do I escape a semicolon at the end of a line of multiline text input?

Answers
Darth Vader
On 2006-08-08 15:11:07