📄 fx.sql
字号:
create table TFX_AREA
(
CYEAR CHAR(4) not null,
VCREPORTCODE VARCHAR2(10) not null,
SISTARTROW NUMBER not null,
SISTARTCOL NUMBER not null,
SIENDROW NUMBER not null,
SIENDCOL NUMBER not null,
CAREATYPE CHAR(4) not null
)
tablespace CW_TS
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create unique index PK_FX_AREA on TFX_AREA (CYEAR,VCREPORTCODE,SISTARTROW,SISTARTCOL,SIENDROW,SIENDCOL)
tablespace CW_TS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create table TFX_CONSTANT
(
CYEAR CHAR(4) not null,
VCNAME VARCHAR2(40) not null,
CMONTHFROM CHAR(7) not null,
CMONTHTO CHAR(7) not null,
VCCOMMENT VARCHAR2(100),
MVALUE NUMBER(15,2) default 0,
SIUSETIMES NUMBER default 0 /*被引用次数*/
)
tablespace CW_TS
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create unique index PK_FX_CONSTANT on TFX_CONSTANT (CYEAR,VCNAME,CMONTHFROM,CMONTHTO)
tablespace CW_TS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create table TFX_FACTORINIT
(
CYEAR CHAR(4) not null,
FACTORNAME VARCHAR2(40) not null,
FORMULA VARCHAR2(200),
ISSYSDEF NUMBER default 0,
BANALYSIS NUMBER default 0 /*是否参与分析(0,不参与)*/
)
tablespace CW_TS
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create unique index PK_FX_FACTORINIT on TFX_FACTORINIT (CYEAR,FACTORNAME)
tablespace CW_TS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create table TFX_FORMULA
(
CYEAR CHAR(4) not null,
VCREPORTCODE VARCHAR2(10) not null,
SIROWLABEL NUMBER not null,
SICOLLABEL NUMBER not null,
VCFORMULA VARCHAR2(2000) not null
)
tablespace CW_TS
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 20K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create unique index PK_FX_FORMULA on TFX_FORMULA (CYEAR,VCREPORTCODE,SIROWLABEL,SICOLLABEL)
tablespace CW_TS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 20K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create table TFX_HEAD
(
CYEAR CHAR(4) not null,
VCREPORTCODE VARCHAR2(10) not null,
SICOLLABEL NUMBER not null,
SIBANISTER NUMBER not null,
SICOLSERIAL NUMBER not null,
VCCOLNAME VARCHAR2(30) not null,
CDATATYPE CHAR(4) not null,
BGETDATACOL NUMBER default 0 /*财务分析是否从表头各列取数*/
)
tablespace CW_TS
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create unique index PK_FX_HEAD on TFX_HEAD (CYEAR,VCREPORTCODE,SICOLLABEL)
tablespace CW_TS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create table TFX_ITEM
(
CYEAR CHAR(4) not null,
VCREPORTCODE VARCHAR2(10) not null,
SIROWLABEL NUMBER not null,
SICOLLABEL NUMBER not null,
VCITEMNAME VARCHAR2(100) null,
BMERGE NUMBER default -1,
BANALYSIS NUMBER default -1,
SIITEMCLASS NUMBER,
VCITEMBM VARCHAR2(10)
)
tablespace CW_TS
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create unique index PK_FX_ITEM on TFX_ITEM (CYEAR,VCREPORTCODE,SIROWLABEL,SICOLLABEL)
tablespace CW_TS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create table TFX_RATE
(
CYEAR CHAR(4) not null,
TYPECODE CHAR(2) not null /*指标类型代码*/,
RATECODE VARCHAR2(20) not null /* 指标代码*/,
RATENAME VARCHAR2(40) /* 指标名称*/,
UNIT VARCHAR2(10) /*单位*/,
FORMULA VARCHAR2(500) /*参考公式*/,
ISSYSDEF NUMBER default 0 /*是否系统定义*/,
QSFORMULA VARCHAR2(1000) /*取数公式*/
)
tablespace CW_TS
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create unique index PK_FX_RATE on TFX_RATE (CYEAR,TYPECODE,RATECODE)
tablespace CW_TS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create table TFX_RATETYPE
(
CYEAR CHAR(4) not null,
TYPECODE CHAR(2) not null,
TYPENAME VARCHAR2(40),
ISSYSDEF NUMBER default 0 /*是否系统定义*/
)
tablespace CW_TS
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create unique index PK_FX_RATETYPE on TFX_RATETYPE (CYEAR,TYPECODE)
tablespace CW_TS
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 10K
next 10K
minextents 1
maxextents 121
pctincrease 0
);
create table TFX_RATEUNIT
(
CYEAR CHAR(4) not null,
UNITNAME VARCHAR2(20) not null,
ISSYSDEF NUMBER default 0 /*是否系统定义*/
)
tablespace CW_TS
pctfree 10
pctused 40
initrans 1
maxtrans 255
storage
(
initial 10K
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -