posted 21 years ago
I am working on a function that upload a flat file(for example, csv file) to Oracle, is it possible to filter some columns in the csv file?
My code is below:
create table tag_ext(
CC VARCHAR2(15),
DESCRP VARCHAR2(100),
IND_ID VARCHAR2(15),
DUMMY VARCHAR2(100),
CTRY_CD VARCHAR2(15),
AREA_CD VARCHAR2(2000)
)
organization external
(
type oracle_loader
default directory extdir
access parameters
(
records delimited by newline
badfile extdir:'t2.bad'
logfile extdir:'t3.log'
skip 27
fields terminated by ',' OPTIONALLY ENCLOSED BY '"'
missing field values are null
(
CC CHAR(15),
DESCRP CHAR(100),
IND_ID CHAR(15),
DUMMY CHAR(100),
CTRY_CD CHAR(15),
AREA_CD CHAR(2000)
)
)
location('ATT.csv')
)
reject limit unlimited
parallel 2;
Now, if I want to skip column 4 in csv file, what parameter should I add to the sql script?
PS: I am able to use sqlldr to perform this job by using "FIELD4 FILLER", but it is not working in the upper script
Thanks,
Raymond