Specifying Data Files

To specify a data file that contains the data to be loaded, use the INFILE keyword, followed by the file name and optional file processing options string. You can specify multiple single files by using multiple INFILE keywords. You can also use wildcards in the file names (an asterisk (*) for multiple characters and a question mark (?) for a single character).

Note:

You can also specify the data file from the command line, using the DATA parameter described in "Command-Line Parameters for SQL*Loader". A file name specified on the command line overrides the first INFILE clause in the control file.

If no file name is specified, then the file name defaults to the control file name with an extension or file type of .dat.

If the control file itself contains the data to be loaded, then specify an asterisk (*). This specification is described in "Identifying Data in the Control File with BEGINDATA" .

Note:

The information in this section applies only to primary data files. It does not apply to LOBFILEs or SDFs.

For information about LOBFILES, see "Loading LOB Data from LOBFILEs".

For information about SDFs, see "Secondary Data Files (SDFs)".

The syntax for INFILE is as follows:

Table 9-1 describes the parameters for the INFILE keyword.


Table 9-1 Parameters for the INFILE Keyword

Parameter Description

INFILE

Specifies that a data file specification follows.

input_filename

Name of the file containing the data. The file name can contain wildcards. An asterisk (*) represents multiple characters and a question mark (?) represents a single character. For example:

INFILE 'emp*.dat'
INFILE 'm?emp.dat'

Any spaces or punctuation marks in the file name must be enclosed in single quotation marks. See "Specifying File Names and Object Names".

*

If your data is in the control file itself, then use an asterisk instead of the file name. If you have data in the control file and in data files, then you must specify the asterisk first in order for the data to be read.

os_file_proc_clause

This is the file-processing options string. It specifies the data file format. It also optimizes data file reads. The syntax used for this string is specific to your operating system. See "Specifying Data File Format and Buffering".