I'm trying to load a tab delim file into a table. Pls check the issue below and help.
LOAD DATA
INFILE 'tab1.txt'
BADFILE 'tab1.bad'
DISCARDFILE 'tab1.dsc'
REPLACE INTO TABLE CL_TAB1
FIELDS TERMINATED BY X'9' OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
A,B,C,D,E
)
tab1.txt File is like below
A B C D E
799 CP AM 27-12-2017
800 CP 18-05-2017
801 USA
- If i don't mention TRAILING NULLCOLS with column names, sqlldr loads only null values into table.
- When I listed col names in TRAILING NULLCOLS, sqlldr loads like below in the table.
A B C D E
799 CP AM 27-12-2017 (Note: this is ok record)
800 CP 18-05-2017 (Note: 18-05-2017 should be loaded onto D col, but loaded onto C)
801 USA (Note: USA should be loaded onto E col, but loaded onto B)
Pls help.
