SQL Loader – Control File For Variable Length Data File(CSV)
Control File to read CSV File
OPTIONS (SKIP=1)
LOAD DATA
INFILE '/home/applmgr/dataFiles/empData.csv'
append INTO TABLE emp
FIELDS TERMINATED BY ","
(
EMPNO ,
ENAME ,
JOB ,
MGR ,
HIREDATE date "DD-MON-YYYY",
SAL ,
COMM ,
DEPTNO
)
Data File
EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO
100,KING1,PRESIDENT,,17-NOV-1981,5000,,10
Place the files in the below location (You have to consider the directories according to your directory structure and make sure to change the data file location in control file)
![](http://oratrainings.com/wp-content/uploads/2020/12/image-2.png)
![](http://oratrainings.com/wp-content/uploads/2020/12/image-3.png)