In order to import DAT file into Oracle table through TOAD follow following steps:
Step1: Create Table “Employee” as below:
CREATE TABLE EMPLOYEE
EMPNAME VARCHAR2(100 BYTE),
Step 2: Create one DAT file with name “Insert_Employee_Data.dat” containing data of Employee table for insertion and save it in D:\ drive as below:
File Name: Insert_Employee_Data.dat
Path: D:\ Insert_Employee_Data.dat
Data in the file:
Step 3: Create CTL file ‘Employee.ctl” and save it in D:\ Drive as below:
File Name: Employee.ctl
Path: D:\ Employee.ctl
CTL file script:
INTO TABLE EMPLOYEE
FIELDS TERMINATED BY ‘,’
Step 4: Go to TOAD and follow below path to call.ctl file:
TOAD >> DATABASE >> IMPORT >> SQL* LOADER WIZARD >> Select “Use Existing Control File” Radio button as shown below:
Now, Click on “Next” button and browse the “Employee.CTL” file from D:\ drive as shown below:
Click “Next” button and execute the script by clicking on the “Finish” button.
Data is loaded successfully as shown below:
Step 5: Check the “Employee” table for data verification uploaded through SQL* Loader.
select * from employee;
This is how we can use the feature of TOAD to upload the data into the database tables.