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!

SQL LOADER - How to combine 3 rows into 1

416492Mar 10 2004 — edited Mar 12 2004
Hi,
I have an input file composed of 4 different data types in 4 rows.
line1 has fld1 text(100)
line2 has fld2 number(4)
line3 has fld3 date(10) "mm/dd/yyyy"
line4 has fld4 date(10) "mm/dd/yyyy"

all line has data in it.

This is my control file:
LOAD DATA
INFILE "fileA.txt"
truncate
CONCATENATE 4
INTO TABLE ps_vz_ppc_blng_aud
TRAILING NULLCOLS
( text_fld CHAR(100) TERMINATED BY WHITESPACE
,num_fld INTEGER EXTERNAL(4)
TERMINATED BY WHITESPACE
,begin_date DATE(10) "mm/dd/yyyy"
TERMINATED BY WHITESPACE
,end_date DATE(10) "mm/dd/yyyy"
TERMINATED BY WHITESPACE
,row_added_dttm sysdate
,row_added_oprid "USER"
)

My error: cannot insert null into num_fld.
What did I do wrong? Terminated by whitespace did not end when the line end? Or the first field needs to be 100 characters and ends with end of line?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 9 2004
Added on Mar 10 2004
6 comments
359 views