This content has been marked as final. Show 3 replies
if the file doesn't contain header row remove the SKIP=1 in the control file.
Below code save to test.ctl in D drive.
and open the DOS prompt run the below command
OPTIONS (SKIP=1) LOAD DATA INFILE 'd:\test.txt' INSERT INTO TABLE emp_info2 FIELDS TERMINATED BY "," TRAILING NULLCOLS ( empno, ename, description )
$sqlldr userid=scott/tiger control=test.ctl log=test.log
Sql * Loader is use to import flat files into the database very fast.
Sql loader have first step to dicide which file needs to be import ie.(excel(.csv file), text file,dat file etc.)
After you need to create control file for upload the data. control file is the code which tell oracle where is the source file, name of the table,column of the table and name of the column.
values are seperated by which character like ',' or '|' etc.
the you need to call the control file to execute the code you have specified inside.