Oracle sql loader 使用案例
2013-07-06 20:26
429 查看
Listing 1:
----------------------
dir *.csv
type abc.csv
sqlplus scott/tiger@orcl
create table emp1 (name varchar2(80), salary number);
host
notepad abc.ctl
load data
infile abc.csv
into table emp
fields terminated by ','
TRAILING NULLCOLS
(name, salary)
sqlldr scott/tiger@orcl abc.ctl
exit
show user
select * from emp1;
----------------------
Listing 2:
---------------------
set heading off
set pagesize 0
spool c:\whatever.txt
select object_name ||','||object_type from all_objects
spool off
create table loaded as
select object_name, object_type from all_objects
where 1=0;
load data
infile 'c:\whatever.txt'
into table loaded truncate
when object_type <> 'INDEX'
fields termindated by ','
(
OBJECT_NAME,
OBJECT_TYPE "TRIM (:object_type)"
)
sqlldr control=c:\whatever.ctl log=c:\whatever.log
-----------------------------------
present by dylan.
----------------------
dir *.csv
type abc.csv
sqlplus scott/tiger@orcl
create table emp1 (name varchar2(80), salary number);
host
notepad abc.ctl
load data
infile abc.csv
into table emp
fields terminated by ','
TRAILING NULLCOLS
(name, salary)
sqlldr scott/tiger@orcl abc.ctl
exit
show user
select * from emp1;
----------------------
Listing 2:
---------------------
set heading off
set pagesize 0
spool c:\whatever.txt
select object_name ||','||object_type from all_objects
spool off
create table loaded as
select object_name, object_type from all_objects
where 1=0;
load data
infile 'c:\whatever.txt'
into table loaded truncate
when object_type <> 'INDEX'
fields termindated by ','
(
OBJECT_NAME,
OBJECT_TYPE "TRIM (:object_type)"
)
sqlldr control=c:\whatever.ctl log=c:\whatever.log
-----------------------------------
present by dylan.
相关文章推荐
- [Oracle] SQL*Loader 详细使用教程(2)- 命令行参数
- [Oracle] SQL*Loader 详细使用教程(1)- 总览
- Oracle SQL*Loader 使用指南
- Oracle 的SQL*LOADER使用
- Oracle SQL*Loader 使用指南(转载)
- oracle sql*loader使用方法
- Oracle SQL*Loader 使用指南(第一部分)
- oracle sql优化案例1(使用组合索引)
- Oracle数据库案例整理-执行Oracle脚本失败或异常-SQL命令中字符串参数使用双引号导致更新数据库表信息失败
- 使用SQL*Loader将CSV文件数据导入ORACLE数据表
- 【ORACLE】sql*loader的使用(以将iostat数据导入数据库表为例)
- Oracle SqlLoader使用
- ORACLE工具之SQL*LOADER工具的使用
- 使用 Sql*Loader 向 Oracle 导入数据
- Oracle SQL*Loader 使用指南
- 使用SQL*LOADER将TXT或CSV数据导入ORACLE
- [Oracle] SQL*Loader 详细使用教程(5)- 典型例子
- [bbk0000] 第101集 -第12章 -数据移植 08 本章案例 -> 使用ORACLE_LOADER引擎创建外部表
- 详细讲解Oracle SQL*Loader的使用方法
- sql*loader 使用案例