How to skip columns using SQL Loader. [message #74612] |
Fri, 21 January 2005 02:10 |
Leonardo Mattos
Messages: 4 Registered: January 2005
|
Junior Member |
|
|
Hi,
I´m facing the following problem:
Suppose the data file contains four columns separated by ';'. The length of columns are variable. I just want to load the second and fourth columns, the first and third columns are not important. The question is, how can these columns? What options I have to put in the control file?
I´m asking that cause I´m building a application where a user can load data from a file to a database and he can choose to use Oracle SQL Loader to load the data. So I don´t want to restrict the possibility of using the Loader in such sittuation.
Thanks.
|
|
|
Re: How to skip columns using SQL Loader. [message #74613 is a reply to message #74612] |
Fri, 21 January 2005 03:18 |
Frank Naude
Messages: 4587 Registered: April 1998
|
Senior Member |
|
|
See section about "Specifying Filler Fields" in the Oracle Database Utilities User Guide.
Example:
LOAD DATA
INFILE *
INTO TABLE doc_table REPLACE
FIELDS TERMINATED BY ','
(
doc_no NUMBER,
cv FILLER,
doc_desc CHAR
)
BEGINDATA
1,cv1.doc,My CV
...
Best regards.
Frank
|
|
|
|