While SQL loading often we are faced with situation where we need to specify a batch size i.e. say while data loading commit after every 10,000 records. This can be done by ROWS clause in OPTIONS area. This can be done by -
-----------------------------------------------
OPTIONS(ROWS=10000)
LOAD DATA
INFILE 'data.txt' "str '^B'" -- Your data file
BADFILE 'data.bad'
DISCARDFILE 'data.dsc'
DISCARDMAX 1000
APPEND
INTO TABLE mytable
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
your comma separated column names here ....
)
-----------------------------------------------
Note the first line where ROWS has been specified. This when loaded would be committing after every 10,000 records loaded.
|