以下是数据文件data.txt的内容
111 , 222
444 ,55
以下是控制文件control.ctl的内容
load data
infile 'C:\Documents and Settings\ilovemk\桌面\data.txt'
append
into table test
fields terminated by ','(
cola "trim(:cola)",
colb "trim(:colb)"
)
SQL> ho sqlldr scott/cgb2235599 control='C:\Documents and Settings\ilovemk\桌面\c
ontrol.ctl'-
> data='C:\Documents and Settings\ilovemk\桌面\data.txt'
SQL*Loader: Release 10.2.0.1.0 - Production on 星期日 9月 30 00:31:32 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
达到提交点 - 逻辑记录计数 12
select length(cola),length(colb) from test;
LENGTH(COLA) LENGTH(COLB)
------------ ------------
3 3
3 2
个人觉得用varchar2字段好一点^_^
sqlldr去掉空格
最新推荐文章于 2022-09-14 08:37:03 发布