I am looking for a way to do selective loading using SQLLDR.
The source file is in "pipe delimited" format.
I know there is a way for this if the source is in a predefined position. It is explained here, by using WHEN & POSITION keywords.
What could I do if the source file is "pipe or tab" delimited?
I am not sure what you mean with "selective loading"?
But ify you are only asking how you can load a file where each column is delimited with a pipe, then use the option
FIELDS TERMINATED BY '|' in the control file.
See the chapter "Variable Record Format" in the SQL*Loader manual for more details and examples:
Depending on which version of the SQLLDR version you are using, you can use the keyword FILLER to skip a field from the file.
The below instruction will skip the second field in the file.
LOAD DATA TRUNCATE INTO TABLE T1 FIELDS TERMINATED BY ',' ( field1, field2 FILLER, field3 )
LOAD DATA INFILE 'c:\myfile.txt' TRUNCATE INTO TABLE T1 FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS (field1, field2 , field3, field4)