Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Using SQL*Plus for loading file containg CR/LF as value of column

Re: Using SQL*Plus for loading file containg CR/LF as value of column

From: Randi Wølner <randiwolner_at_hotmail.com>
Date: Thu, 30 Jan 2003 13:39:32 +0100
Message-ID: <b1b6au$d35$1@oslo-nntp.eunet.no>

Thanks for your answer.
Right now I discovered that text containing a semicolon (;) is also a problem, as SQL*Plus then considers it as end of that INSERT, and gives this error message:

ERROR:
ORA-01756: quoted string not properly terminated

Is there any "filter" program available that takes care of translating all characters that gives SQL*Plus problems, or will I have to make one? The filter should translate these characters only when they are found between apostrofs..

Randi W




That application should generate:

    insert into ..... values (..., 'this is the first line'||chr(13)||'second line' ,...)
Character 13 is the decimal value of the CR character. Character 15 is the decimal value of the LF character, mayby you need to concatenate it too.

Randi Wølner <randiwolner_at_hotmail.com> schreef in berichtnieuws b161v8$m77$1_at_oslo-nntp.eunet.no...
| Hello,
| I have a data transfer from an application, where this other application
| creates a file containing SQL's. Some times it happens that the user write
| some blank lines in this "other application", which make the VALUES-part
of
| the INSERT contain CR/LF's. A little simplified the INSERT in the
text-file
| to be spooled into SQL*Plus looks like this:
|
| INSERT INTO HTable (UId, descr, numb) VALUES (63184283, 'THIS IS THE FIRST
| LINE
|
| THIS IS THE THIRD LINE
|
| ', 123);
|
| SQL*Plus gives an error message of this type:
|
| SP2-0734: unknown command beginning "', 123.." - rest of line ignored.
|
| Is there any way to make SQL*Plus understand that the CR/LF's are part of
| the data to be inserted into the table?
|
| Thanks for any help!!
|
| Regards,
| Randi Wølner
|
|
|
Received on Thu Jan 30 2003 - 06:39:32 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US