开源中文网

您的位置: 首页 > 数据库应用 > Oracle > 正文

oracle10g_sqlldr

来源: 网络整理  作者: 佚名

sqlldr_oracle10g_redhat5.4
sqlldr
sqlldr is used for inputing data into oracle database.we call it datapumb.
how to commplete the procedure in the oracle10g ?
the following statement show you .
1)
#su - oracle
$cd              
$vim test_1.ctl
input the information below
############begin##############
LOAD DATA
/*characterset ZHS16GBK*/ it is comment
INFILE 'test_1.dat'
DISCARDFILE 'test_1.dis'
append
INTO table hr.testtable
TRAILING NULLCOLS
(
date1   position(1:8)  date(8) "YYYYMMDD" terminated by ',',
phonenumber position(10)  decimal external terminated by ',',
describe char terminated by whitespace
)
#############end################
this procedure describe the three basic data types.we can expand it to satisfy the complex report forms.
2)
we must make sure that infile and that table exist.
$sqlplus /nolog
$hr/**
$sql> create table testtable ( date1 date,
                          phonenumber number(15),
                          describe varchar2(30) );
$sql> exit
$vim infile test_1.dat
input your data must obey the rule.
##############begin################
20110908,13254654582,success
##############end##################
it is just a test .
make sure the char position.we must care the format.
3)
$sqlldr hr/** control=test_1.ctl
check the home directory.

作者“redhat6_push_experience”

Tags:oracle10g_sqlldr
相关文章列表:
关于开源中文网 - 联系我们 - 广告服务 - 网站地图 - 版权声明