DEVFYI - Developer Resource - FYI

Can one skip certain columns while loading data? (for DBA

ORACLE Interview Questions and Answers (Part 5)


(Continued from previous question...)

886. Can one skip certain columns while loading data? (for DBA

One cannot use POSTION(x:y) with delimited data. Luckily, from Oracle 8i one can specify FILLER columns. FILLER columns are used to skip columns/fields in the load file, ignoring fields that one does not want. Look at this example: -- One cannot use POSTION(x:y) as it is stream data, there are no positional fields-the next field begins after some delimiter, not in column X. -->
LOAD DATA
TRUNCATE INTO TABLE T1
FIELDS TERMINATED BY ','
( field1,
field2 FILLER,
field3
)

(Continued on next question...)

Other Interview Questions