Consider below scenario:
Table T1 (f1, f2, f3);
Data files:
a|b|c|d
w|x|y|z
I want to load this data skipping the second field as follow:
f1 f2 f3
--- --- ---
a d c
w z y
Would really appreciate your help or any pointer in constructing the control file to achieve this.
Define the column you want to skip as FILLER. Keep in mind the order of the columns in the control file is typically the order they are in the datafile. If the name matches a column in the table, that's where it will go.
In other words, the order of the columns in the control file matches the order they are in the data file, not their order in the table. That is matched by name, not order.
EDIT - I added some comments for explanation, but I believe they can't be in that position in the actual file. See below for a full example:
Create table:
The control file, example.ctl:
Run it:
Select from the table:
Hopefully this helps.