Home » SQL & PL/SQL » SQL & PL/SQL » Load a CSV filke with SQLLOADER
Load a CSV filke with SQLLOADER [message #8268] Wed, 06 August 2003 20:56 Go to next message
Alex
Messages: 190
Registered: August 1999
Senior Member
Hi All,

It has been a while since I used SQLLOADER.
I forget if there is a way to load only certain
fields from a csv file using a control file.

EXAMPLE:

I have a csv file Data1,data2,data3,data4,data5

Lets say all I want to load into my table is field 2 and 5 or (data2,data5). Can I do thart in the control file?

load data
replace into table t1
fields terminated by ","
(
?
?
?
)

I know I could use a cut command in unix to strip off the other fields and then build the control file, but I would like to know if I can specify wich field number to grab in the control file.

Thanks.. :)
Re: Load a CSV filke with SQLLOADER [message #8271 is a reply to message #8268] Wed, 06 August 2003 21:19 Go to previous message
Barbara Boehmer
Messages: 9090
Registered: November 2002
Location: California, USA
Senior Member
You can use the FILLER key word to skip certain columns:

load data
replace into table t1
fields terminated by ","
(
data1 FILLER,
data2,
data3 FILLER,
data4 FILLER,
data5
)
Previous Topic: sql-plz. help
Next Topic: Daily Run Job Question
Goto Forum:
  


Current Time: Tue Apr 23 10:05:32 CDT 2024