Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Newline character within double quotes in csv file

SamBOct 23 2007 — edited Oct 26 2007

I have an external table defined as follows:

CREATE TABLE EXT_MASTER
   (	"SOME_CODE" VARCHAR2(255 BYTE), 
	"FAX_NUMBER" VARCHAR2(255 BYTE), 
	"WEB_ADDRESS" VARCHAR2(255 BYTE), 
   ) 
   ORGANIZATION EXTERNAL 
    ( TYPE ORACLE_LOADER
      DEFAULT DIRECTORY "SOME_DIR"
      ACCESS PARAMETERS
      ( RECORDS DELIMITED BY NEWLINE
          NODISCARDFILE
          LOGFILE 'master.log'
          BADFILE 'global.bad'
          SKIP 1
        FIELDS TERMINATED BY ',' 
          OPTIONALLY ENCLOSED BY '"'
          LRTRIM
          MISSING FIELD VALUES ARE NULL 
    )
      LOCATION
       ( 'Master.csv'
       )
    )
   REJECT LIMIT UNLIMITED;

In my datafile I have newline characters within double quotes. This seems to be illegal using the above definition for the table.

Is there a way to make Oracle ignore newline characters in csv files when they are enclosed in double quotes? Or should I ask my data provider to remove them?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 23 2007
Added on Oct 23 2007
11 comments
2,151 views