oracle sqlldr命令 sqlldr加载数据到不同表的问题
sqlldr加载数据到不同表的问题
◆首先我们来创建测试表
D:Orion>sqlplus eygle/eygle SQL*Plus: Release Production on 星期一 月 :: Copyright (c) Oracle Corporation All rights reserved 连接到: Oracle i Enterprise Edition Release Production With the Partitioning OLAP and Oracle Data Mining options JServer Release Production : : SQL> create table test ( : : a varchar ( ) : : a varchar ( ) : : a varchar ( )); 表已创建 已用时间: : : : : SQL> create table test ( : : a varchar ( ) : : a varchar ( ) : : a varchar ( )); 表已创建 已用时间: : : : : SQL> exit 从Oracle i Enterprise Edition Release Production With the Partitioning OLAP and Oracle Data Mining options JServer Release Production中断开

◆然后我们来测试数据
D:Orion>cat data txt KunMing YunNan BeiJing BeiJing ShenZhe ShenZhe TianJin TianJin D:Orion>
◆控制文件
D:Orion>cat data ctl LOAD DATA INFILE data txt APPEND INTO TABLE test WHEN ( ) = FIELDS TERMINATED BY OPTIONALLY ENCLOSED BY TRAILING NULLCOLS ( a POSITION( : ) a POSITION( : ) a POSITION( : ) ) INTO TABLE test WHEN ( ) = FIELDS TERMINATED BY OPTIONALLY ENCLOSED BY TRAILING NULLCOLS ( a POSITION( : ) a POSITION( : ) a POSITION( : ) )
◆加载数据
D:Orion>sqlldr eygle/eygle errors= log=data log control=data ctl SQL*Loader: Release Production on 星期一 月 : : Copyright (c) Oracle Corporation All rights reserved 达到提交点 逻辑记录计数 达到提交点 逻辑记录计数
◆检查结果
D:Orion>sqlplus eygle/eygle SQL*Plus: Release Production on 星期一 月 : : Copyright (c) Oracle Corporation All rights reserved 连接到: Oracle i Enterprise Edition Release Production With the Partitioning OLAP and Oracle Data Mining options JServer Release Production : : SQL> select * from test ; A A A KunMing YunNan 已用时间: : : : : SQL> select * from test ; A A A BeiJing BeiJing ShenZhe ShenZhe TianJin TianJin 已用时间: : : : : SQL> exit 从Oracle i Enterprise Edition Release Production With the Partitioning OLAP and Oracle Data Mining options JServer Release Production中断开
lishixinzhi/Article/program/Oracle/201311/18143