Transfer from http://www.jiejingwang.com 2002-10-24 shortcut Network
========================================================== =
System Environment:
1. Operating System: Windows 2000 Server, 128 MB of machine memory
2. Database: Oracle 8i R2 (8.1.6) for NT Enterprise Edition
3. installation path: C: Oracle
Steps:
1. Open Microsoft Excel 2000
2. File (f) → new (n) → workbook →
3. input the following data, and the storage disk is test.xls,
4. File (f) → save as (a) →
The storage type is: delimiter, the name is text.txt, and saved to C:
5. Connect to SQL * Plus
Log On As A system/Manager User,
SQL> conn system/Manager
Create Table Structure
SQL> Create Table Test
(
ID number, -- serial number
Username varchar2 (10), -- User Name
Password varchar2 (10), -- Password
SJ varchar2 (20) -- Build date
);
6. Create the files required for SQL * loader input data and save them to C:. use NotePad to edit them:
Control File: Input. CTL. The content is as follows:
Load data -- 1. Control File ID
Infile 'test.txt '-the name of the data file to be input is test.txt
Append into table test -- 3. append records to Table Test
Fields terminated by X '09' -- 4. The field is terminated on X '09' and is a tab)
(ID, username, password, SJ) ----- defines the column Sequence
A. insert, which is the default mode. The table is required to be empty when data loading starts.
B. append: Add a new record to the table
C. Replace: delete old records and replace them with newly loaded records.
D. truncate, same as above
7. Use the SQL * loader command in the DOS window to input data.
C:> sqlldr userid = system/Manager Control = input. CTL
The default log file name is input. log.
The default bad record file is input. Bad.
8. Connect to SQL * Plus to check whether the input is successful.