Oracle7 Server Utilities

Contents Index Home Previous Next

Discarded Records

If there is no INTO TABLE keyword specified for a record, the record is discarded. This situation occurs when every INTO TABLE keyword in the SQL*Loader control file has a WHEN clause; and either the record fails to match any of them or all fields are null.

No records are discarded if an INTO TABLE keyword is specified without a WHEN clause. An attempt is made to insert every record into such a table. So records may be rejected, but none are discarded.

Case 4 [*] has an example of a discard file.

Limiting the Number of Discards

You may limit the number of records to be discarded for each datafile with the clause:

where n must be an integer. When the discard limit is reached, processing of that datafile terminates and continues with the next datafile, if one exists.

You can specify a different number of discards for each datafile. Alternatively, if the number of discards is only specified once, then the maximum number of discards is the same for all files.

If you specify a maximum number of discards, but no discard filename; SQL*Loader creates a discard file with the default filename and file extension or file type. Case 4 [*] has an example.

Using a Command-Line Parameter

You can specify the discard file from the command line, with the DISCARD parameter or the DISCARDMAX parameter described [*].

A filename specified on the command line goes with the first INFILE or INDDN clause in the control file, overriding any bad file that may have been specified as part of that clause.


Contents Index Home Previous Next