关于sqlldr的control文件,有一些疑问,希望各位大侠帮助解决一下,必谢!!

chenkk1978 2005-03-25 04:15:03
关于sqlldr的control文件,有一些疑问,希望各位大侠帮助解决一下,必谢!!

建表的sql文件如下所示:
create table MD0390
(
Hiho_no CHAR(10) not null,
HosuIdo_ymd NUMBER(8) not null,
IdoShok_idx NUMBER(2) not null,
KokanSkbt_no CHAR(4) not null,
Ido_ymd NUMBER(8) not null,
Teisei_ymd NUMBER(8) not null,
IdoKbn_cd NUMBER(1) not null,
IdoJ_cd NUMBER(2) not null,
ShoHknSha_no NUMBER(6) not null,
StmS_ymd NUMBER(8) not null,
StmE_ymd NUMBER(8) not null,
StmKbn_cd CHAR(1) not null,
StmSrv_cd CHAR(2) not null,
Koshin_ymd NUMBER(8) not null,
Koshin_hms NUMBER(8) not null
)
tablespace MD01_tbspace
STORAGE (INITIAL 100K NEXT 50K
MINEXTENTS 1 MAXEXTENTS 50 PCTINCREASE 10 )
/

control文件如下:
load data
infile MD0390.DAT "FIX 90"
TRUNCATE
preserve blanks
into table MD0390 (
Hiho_no CHAR(10),
Hosuido_ymd ZONED(8),
Idoshok_idx ZONED(2),
Kokanskbt_no CHAR(4),
Ido_ymd ZONED(8),
Teisei_ymd ZONED(8),
Idokbn_cd ZONED(1),
Idoj_cd ZONED(2),
Shohknsha_no ZONED(6),
Stms_ymd ZONED(8),
Stme_ymd ZONED(8),
Stmkbn_cd CHAR(1),
Stmsrv_cd CHAR(2),
Koshin_ymd POSITION(*+12) DECIMAL(8),
Koshin_hms DECIMAL(8)
)

我的问题是:
1, "FIX 90"是什么意思
2,Koshin_ymd POSITION(*+12) DECIMAL(8),
这句话当中,POSITION(*+12)是什么意思
3,ZONED是什么类型的数据。在sql语句中定义为number类型的,为什么定义为ZONED类型


...全文
191 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
chenkk1978 2005-03-29
  • 打赏
  • 举报
回复
还有哪位大虾指点一下,最好是中文的
chenkk1978 2005-03-26
  • 打赏
  • 举报
回复
楼上,采用16进制是什么意思??
不是decimal digits么??
说的具体点好么??
liallen 2005-03-25
  • 打赏
  • 举报
回复
采用16进制
waxle 2005-03-25
  • 打赏
  • 举报
回复
Fix is Specifies that each record in the datafile is of fixed length 90
POSITION(*+12)可能是POSITION(*+2)吧,意思就是空两格以后的字符就是属于Koshin。

ZONED data is in zoned decimal format: a string of decimal digits, one per byte,
with the sign included in the last byte. (In COBOL, this is a SIGN TRAILING field.)
The length of this field is equal to the precision (number of digits) that you specify.
The syntax for the ZONED datatype is:

In this syntax, precision is the number of digits in the number, and scale (if
given) is the number of digits to the right of the (implied) decimal point. The
following example specifies an 8-digit integer starting at position 32:
sal POSITION(32) ZONED(8),

The ZONED clause is used to indicate that the field is a zoned decimal number. The
precision field indicates the number of digits in the number. The scale field is
used to specify the location of the decimal point in the number. It is the number of
digits to the right of the decimal point. If scale is omitted, a value of 0 is assumed.

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧