I'm working on a task to load Database table from a flat file. My database table has 60 columns. Now, In SQL LOADER control file, Is it mandatory to mention all the 60 fields ? Is there a way to tell SQL LOADER that all 60 columns should be treated as required without mentioning the fields in the Control File ?
Asked
Active
Viewed 528 times
0
-
possible duplicate of https://stackoverflow.com/questions/47734750/auto-match-fields-to-columns-sql-loader – Gnqz Jun 17 '22 at 11:36
1 Answers
2
Oracle 12c (and higher versions) offer express mode.
In a few words (quoting the document):
The SQLLoader TABLE parameter triggers express mode. The value of the TABLE parameter is the name of the table that SQLLoader will load. If TABLE is the only parameter specified, then SQL* loader will do the following:
- Looks for a data file in the current directory with the same name as the table being loaded that has an extension of ".dat". The upper/lower case used in the name of the data file is the same as the case for the table name specified in the TABLE parameter
- Assumes the order of the fields in the data file matches the order of the columns in the table
- Assumes the fields are terminated by commas, but there is no enclosure character
(...) order of the fields in the data file matches the order of the columns in the table. The following SQL*Loader command will load the table from the data file.
sqlldr userid=scott table=emp
Notice that no control file is used. After executing the SQL*Loader command, a SELECT from the table will return (...)
I guess that's what you're after.

Littlefoot
- 131,892
- 15
- 35
- 57
-
Hi. Firstly My apologies for the delay in response to your answer. Yes. I am after this only. I will try this and get back to you. Many thanks – Althaf Aug 18 '22 at 09:20