请教
文本数据格式如下:
2| 1.10| 10 | 1,000.00|03
3| 3,000.10| 10 | 1,111,000.00|03
控制文件如下:
load data
infile 'e:\xx.txt'
append into table txx
(act_1 char terminated by '|',
txn_2 char terminated by '|' ,
proc_3 char terminated by '|',
txn_4 char terminated by '|',
new_5 char terminated by whitespace)
其中txn_2,new_5在txx表中为number(13,2)类型的数据。如何处理呢????
请大家给予帮助,谢谢
文本数据格式如下:
2| 1.10| 10 | 1,000.00|03
3| 3,000.10| 10 | 1,111,000.00|03
控制文件如下:
load data
infile 'e:\xx.txt'
append into table txx
(act_1 char terminated by '|',
txn_2 char terminated by '|' ,
proc_3 char terminated by '|',
txn_4 char terminated by '|',
new_5 char terminated by whitespace)
其中txn_2,new_5在txx表中为number(13,2)类型的数据。如何处理呢????
请大家给予帮助,谢谢
解决方案 »
- 用merge遇到的问题
- 大家帮我看看这是什么原因?
- 表查询中建立索引的数量应该怎样控制?
- 开发人员----》DBA或者数据库系统工程师发展
- ORACLE 导出错误!1帖100
- 我安装了oracle9i的客户端,能否用它直接连上oracle8i的数据库?
- 请教一个Oracle触发器的问题
- 奇怪的触发器问题,总提示编译出错!
- Oracle8.0.5的数据库如何做双机
- Oracle中SqlJ的基本用法是什么
- 100分!!!如何用SQL PLUS远程登陆ORACLE数据库(请高手详细做答)
- 请问我想取出记录集的第30之60条记录,应该怎么写呢?我写成where rownum>30 and rownum<60为什么选不出来纪录呢?
文本文件d:\xx.txt:
2| 1.10| 10 | 1,000.00| 03
3| 3,000.10| 10 | 1,111,000.00| 03控制文件d:\a.ctl:
load data
infile 'd:\xx.txt'
append into table txx
fields terminated by '|'
(act_1,
txn_2 "replace(:txn_2,',','')",
proc_3 position(22:23),
txn_4 "replace(replace(:txn_2,',',''),',','')",
new_5 position(50:51)
) 表结构:
SQL> desc txx;
名称 是否为空? 类型
----------------------------------------- -------- ---------------------------- ACT_1 CHAR(1)
TXN_2 NUMBER(13,2)
PROC_3 CHAR(2)
TXN_4 NUMBER(13,2)
NEW_5 CHAR(2)执行sqlldr前:
20:10:37 SQL> select * from txx;未选定行执行sqlldr后:
20:10:51 SQL> select * from txx;A TXN_2 PR TXN_4 NE
- ---------- -- ---------- --
2 1.1 10 1.1 3
3 3000.1 10 3000.1 3Good luck!!
列的 SQL 串: "replace(:txn_amt,',','')"
TXN_MENO NEXT * | CHARACTER
REDEPOST_AMT NEXT * | CHARACTER
列的 SQL 串: "replace(:redepost_amt,',','')"
NEW_BAL NEXT * WHT CHARACTER