1. Enter Excel Test form, Test.xls.
2. Save As. csv format
3. Create the Sql*loader control file Test.ctl, which reads as follows:
Load data
Infile ' C:\test.csv '
Insert INTO table test fields terminated by ', ' (COLUMN1,COLUMN2,COLUMN3,COLUMN4,COLUMN5)
Data files need to be copied to the corresponding location
4. Create a corresponding test table in the database tests
CREATE TABLE Test (
Column1 Varchar2 (10),
Column2 Varchar2 (10),
Column3 Varchar2 (10),
Column4 Varchar2 (10),
Column5 Varchar2 (10)
)
5. Execute the Import command
Sqlldr userid = system/123456 control= ' C:\test.ctl '
Import Successful!
Report:
Description of the SQLLDR function keyword:
Userid--oracle User name UserID = Username/password
Control-controls the name of the file = ' E:\insert.ctl '
log–-log file name log = ' E:\insert.log '
bad--Corrupt file name
Data--data file name
Discard--discard file name
Discardmax--number of discards to allow (default all)
skip--number of record rows skipped while importing (default 0)
load--the number of record rows imported when importing (default all)
errors--number of rows allowed for error (default 50)
CTL File Content Description:
Load data
Infile ' e:\test.csv '--Data source file name
Append|insert|replace--append appended to the table, insert inserts an empty table, replace replaces the original content
into table test--the name of the database table to import
[When id = id_memo]--filter condition
Fields terminated by X ' 09 '--field delimiter
(id,name,telphone)--List of field names
Excel Import Oracle Database