Home » SQL & PL/SQL » SQL & PL/SQL » inserting a value of varchar2 containig new line
inserting a value of varchar2 containig new line [message #21575] Thu, 15 August 2002 01:42 Go to next message
Martina
Messages: 3
Registered: August 2002
Junior Member
Hello,
I have a problem when I want to insert into the field -varchar2 data type - a value that looks like this:

'aaaa

bbb bbbb'

I get this error message:
SP2-0734: unknown command beginning "bbb..." - rest of line ignored.

The problem is because of the new line between aaaa and bbb rows.
Do you have any ideas how to insert such a string into the given field of the table?

Thank you
Martina.
Re: inserting a value of varchar2 containig new line [message #21576 is a reply to message #21575] Thu, 15 August 2002 05:26 Go to previous message
Keith
Messages: 88
Registered: March 2000
Member
This is a SQL Plus limitation - it interprets the carriage return as the end of the command block, and then picks up bbb as a new command, hence the error.

I don't know of a way around this in SQL*Plus, but TOAD (http://www.toadsoft.com) will let you do this through it's SQL Editor (presumably SQL*Worksheet will work also).

krjf@8i> l
1* select * from test
krjf@8i> /

CUSTID
---------------
aaaa

bbb bbbb

1 row selected.
Previous Topic: sql query trouble
Next Topic: inserting value into varchar2 data type that contains new line
Goto Forum:
  


Current Time: Fri Apr 26 22:17:51 CDT 2024