By Administrator on 2010-01-24 16:41:07
Category - Data Loading
Sql Loader (sqlldr) - how to load only first n records e.g. say load first 10 records only
In SQL Loader, if you want to only load specific records, say first 10 records only, then you can use the "LOAD=n" option in your control file.

Using this option, only first n records from data file will be loaded. Sample us of the LOAD keyword is like this - 

The control file is - 
-----------------------------------------------
OPTIONS(LOAD=10)
LOAD DATA
INFILE 'data.txt'  -- Your data file here
BADFILE 'load.bad'
DISCARDFILE 'load.dsc'
DISCARDMAX 10000
APPEND
INTO TABLE mytable
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
your comma separated column names here ...
)
-----------------------------------------------

Above control file will only load first 10 records from the data file "data.txt".
(see the first line in control file).


Please login first to post a comment on this thread OR to create a new thread...
Google best Oracle sites right from here >