|
Oracle Database 12c: Administration Workshop P116:
1
-- This is a sample control file
2 LOAD DATA
3 INFILE ’SAMPLE.DAT’
4 BADFILE ’sample.bad’
5 DISCARDFILE ’sample.dsc’
’
’
6 APPEND
7 INTO TABLE emp
8 WHEN (57) = ’.’
9 TRAILING NULLCOLS
10 (hiredate SYSDATE,
deptno POSITION(1:2) INTEGER EXTERNAL(3)
NULLIF deptno=BLANKS,
job POSITION(7:14) CHAR TERMINATED BY WHITESPACE
NULLIF job=BLANKS "UPPER(:job)",
mgr POSITION(28:31) INTEGER EXTERNAL
TERMINATED BY WHITESPACE, NULLIF mgr=BLANKS,
ename POSITION(34:41) CHAR
TERMINATED BY WHITESPACE "UPPER(:ename)",
empno POSITION(45) INTEGER EXTERNAL
TERMINATED BY WHITESPACE,
sal POSITION(51) CHAR TERMINATED BY WHITESPACE
"TO_NUMBER(:sal,’$99,999.99’)",
comm INTEGER EXTERNAL ENCLOSED BY ’(’ AND ’%’
":comm * 100"
)
原文件在此:
-
- Today's Newly Hired Employees
- Dept Job Manager MgrNo Emp Name EmpNo Salary/Commission
- ---- -------- -------- ----- -------- ----- -----------------
- 20 Salesman Blake 7698 Shepard 8061 $1,600.00 (3%)
- Falstaff 8066 $1,250.00 (5%)
- Major 8064 $1,250.00 (14%)
- 30 Clerk Scott 7788 Conrad 8062 $1,100.00
- Ford 7369 DeSilva 8063 $800.00
- Manager King 7839 Provo 8065 $2,975.00
复制代码
ulcase7.dat
(561 Bytes, 下载次数: 195)
|
|