Sqlldr is used to quickly bulk import data,
The example steps are as follows:
1. Determine connection examples for Oracle
username/[email protected]
I'm using:system/ World @ LOCALORCL
The SID is an example of a connection, the service naming in Net Manager, as follows:
2. Create a table with the following statement:
CREATE TABLE TT ( ID INTEGER, NAME VARCHAR2 , CON VARCHAR2 ( BYTE), DT DATE)
3. Create the data file under the D drive: test.txt
Content:
1,a,,2007-07-8
2,b,,2008-07-8
3,c,,2009-07-8
4. Create the control file under the D drive: Dept.ctl
Content:
Load
InFile "D://test.txt"
Append into table TT
Fields terminated by ","
Trailing Nullcols
(
ID integer external,
Name "Upper (: Name)",
Con ": id| |:name",
DT Date "YYYY-MM-DD"
)
5, CMD under the command line:
Sqlldr System/ World@LOCALORCL Control= D :/Dept.ctl
6, the database to query the TT table,
SELECT * FROM TT
The data are as follows:
Oracle Sqlldr Use Example