Home » RDBMS Server » Server Utilities » SQLLDR - Delimited by NEWLINE
SQLLDR - Delimited by NEWLINE [message #330509] Mon, 30 June 2008 06:16 Go to next message
ttrr
Messages: 1
Registered: June 2008
Junior Member
Hello everybody,
Hope everyone's Happy Smile!

Because i am not Sad, and I have the following problem:
I'm trying to import a CSV from Mysql to Oracle with this
structure:

MYSQL sql export comand:
-------------------------------------
FIELDS TERMINATED BY '$$##$#$#$'
ENCLOSED BY '%%%#&#&#%'
LINES TERMINATED BY '___%%_'
--------------------------------------

My control file:
----------------
load data
infile 'C:\\c002.csv'
into table "table"
RECORDS delimited by '___%%_'
fields terminated by '$$##$#$#$'
optionally enclosed by '%%%#&#&#%'
(field1,field2,free_text)
----------------

The issue here is the field 'free_text', because this field can have newline,\n, or \r\n, I've chose to use LINES TERMINATED BY '___%%_'" in mysql, however I cant Load the file into oracle. It gives the error:

SQL*Loader-350: Syntax Error Line 4.
Expected "(", found "RECORDS".
RECORDS delimited by newline
^
Cant I specify RECORDS delimited by '___%%_' ?

Any Ideas?
Thank you all,


Re: SQLLDR - Delimited by NEWLINE [message #330641 is a reply to message #330509] Mon, 30 June 2008 12:48 Go to previous message
Barbara Boehmer
Messages: 9092
Registered: November 2002
Location: California, USA
Senior Member
http://download.oracle.com/docs/cd/B28359_01/server.111/b28319/ldr_concepts.htm#sthref718
Previous Topic: ORA-00439
Next Topic: couldn't figure out the error in exp
Goto Forum:
  


Current Time: Sat May 11 07:28:27 CDT 2024