Skip to Main Content

Oracle Database Discussions

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!

Loading clob as null using sqlldr

maldrich12Sep 17 2020 — edited Sep 18 2020

Hi,

Version is 19.3, SE2.

I am trying to load clob data as a null into a table. My ctl file:

OPTIONS (SILENT = (FEEDBACK), DIRECT = FALSE, ERRORS = 100000)

LOAD DATA

INFILE "rptparam.txt" "str '<~>\n'"

APPEND INTO TABLE rptparam

FIELDS TERMINATED BY x'19'

DATE FORMAT "MM/DD/YYYY HH24:MI"

TRAILING NULLCOLS

(

QUEUE_SERIAL,

PARAM_NUMBER,

PARAM_TYPE,

PARAM_DESC,

PARAM_VALUE CHAR(500000) NULLIF "PARAM_VALUE"=BLANKS

)

My input file:

       5240^Y    11^Y^YTo Class^Y2087<~>

       5240^Y    10^Y^YFrom Class^Y0096<~>

       5240^Y     9^Y^YInclude Headers^YN<~>

       5240^Y     8^Y^YRate ad class sort^Y<~>

       5240^Y     7^Y^YAdvertiser type^YB<~>

      5240^Y     6^Y^YZone^Y<~>

       5240^Y     5^Y^YPublication^YTH<~>

I would like the record without PARAM_VALUE to be null. It is loading as a single character. Is there a way around this?

This post has been answered by Mustafa KALAYCI on Sep 18 2020
Jump to Answer
Comments
Post Details
Added on Sep 17 2020
2 comments
443 views