Skip to Main Content

Database Software

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!

How to remove extra space at end of File when using SQL Loader?

3042718Feb 24 2016 — edited Feb 24 2016

Hi All,

I am using SQL loader to load data into Oracle from csv file. My csv file is as below.

LOAD DATA

REPLACE

PRESERVE BLANKS

INTO TABLE ce_stmt_int_tmp

WHEN rec_id_no != '03'

FIELDS TERMINATED BY ","

TRAILING NULLCOLS

(rec_no RECNUM,

rec_id_no NULLIF rec_id_no =BLANKS ,

column1   NULLIF column1 =BLANKS,

column2   NULLIF column2 =BLANKS,

column3        NULLIF column3 =BLANKS,

column4   NULLIF column4 =BLANKS,

column5   NULLIF column5 =BLANKS,

column6   NULLIF column6 =BLANKS,

column7   NULLIF column7 =BLANKS,

....

column34NULLIF column34=BLANKS,
column35NULLIF column35=BLANKS)

INTO TABLE ce_stmt_int_tmp

The file which I receive from source system has an extra space at end of the file

-------------------------------------------------------------

49,+0000000000000,000003/

98,+0000299780618,000006,000030/

99,+0000299780618,000001,000032/

------------------------------------------------------------

What command should I use in ctl file to not insert NULLs in the table?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 23 2016
Added on Feb 24 2016
1 comment
2,047 views