• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

About loading external files in Oracle 9i

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic