Insert date from a .csv file into an Oracle table
The contents of the control file will depend on the structure of the data you are loading. Here is an example of a control file that loads data from a comma-delimited file called "myfile.csv".
LOAD DATA
INFILE "myfile.csv"
APPEND INTO TABLE emp
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
(empno, ename, job, mgr,
hiredate DATE(20) "DD-Month-YYYY",
sal, comm, deptno, projno)
In the comma-delimited file, the value in the field for the HIREDATE column is in a specific date format that may differ from our database's default date format. This is not a problem as we can change the format in our control file. Notice that the HIREDATE column in the control file sample above contains the date format "DD-Month-YYYY". You can use any valid date format to match your requirements.