⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bb.sql

📁 一个用VB写的财务软件源码
💻 SQL
字号:
create table TBB_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    varchar2(8) not null
)
tablespace CW_TS
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
alter table TBB_AREA
  add constraint PK_BB_AREA primary key (CYEAR,VCREPORTCODE,SISTARTROW,SISTARTCOL,SIENDROW,SIENDCOL)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 20K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_AUTHORITY
(
  VCREPORTCODE VARCHAR2(10) not null,
  VCUSERID     VARCHAR2(4) not null,
  CAUTHORITY   CHAR(4)
)
tablespace CW_TS
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
alter table TBB_AUTHORITY
  add constraint PK_BB_AUTHORITY primary key (VCREPORTCODE,VCUSERID)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_CARRYFORWARD
(
  CYEAR              CHAR(4) not null,
  ICARRYFORWARDYEAR  NUMBER not null,
  ICARRYFORWARDMONTH NUMBER not null,
  BCARRYFORWARD      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
  );
alter table TBB_CARRYFORWARD
  add  constraint PK_BB_CARRYFORWARD primary key (CYEAR)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_COLLECTPRINTSET
(
  SIGROUPCOLS NUMBER not null
)
tablespace CW_TS
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents unlimited
    pctincrease 0
  );
create table TBB_COLLECTTABLE
(
  CYEAR               CHAR(4) not null,
  VCCOLLECTREPORTCODE VARCHAR2(10) not null,
  VCCOLLECTREPORTNAME VARCHAR2(50) not null,
  VCREPORTCODE        VARCHAR2(10) not null,
  SICOLNAME           VARCHAR2(50) not null
)
tablespace CW_TS
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents unlimited
    pctincrease 0
  );
alter table TBB_COLLECTTABLE
  add constraint PK_BB_COLLECTTABLE primary key (CYEAR,VCCOLLECTREPORTCODE)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_COMPANY
(
  CYEAR  CHAR(4) not null,
  VCCODE VARCHAR2(10) not null,
  VCNAME VARCHAR2(50) not null,
  CTYPE  CHAR(4) not null,
  BMERGE NUMBER default -1  /*是否合并*/
)
tablespace CW_TS
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
alter table TBB_COMPANY
  add constraint PK_BB_COMPANY primary key (CYEAR,VCCODE)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_EQUALIN
(
  CYEAR           CHAR(4) not null,
  VCREPORTCODE    VARCHAR2(10) not null,
  ISORTID         NUMBER not null,
  SIROWLABEL      NUMBER not null,
  SICOLLABEL      NUMBER not null,
  CCALCULATESIGN  CHAR(1) not null,
  SISTARTROWLABEL NUMBER not null,
  SIENDROWLABEL   NUMBER not null,
  SISTARTCOLLABEL NUMBER not null,
  SIENDCOLLABEL   NUMBER not null
)
tablespace CW_TS
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 20K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
alter table TBB_EQUALIN
  add constraint PK_BB_EQUALIN primary key (CYEAR,VCREPORTCODE,ISORTID)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 20K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_EQUALOUT
(
  CYEAR          CHAR(4) not null,
  VCREPORTCODE   VARCHAR2(10) not null,
  ISORTID        NUMBER not null,
  SIROWLABEL     NUMBER not null,
  SICOLLABEL     NUMBER not null,
  CCALCULATESIGN CHAR(2) not null,
  VCREPORTCODE2  VARCHAR2(10) not null,
  VCGETTIME      CHAR(20) not null,
  SIROWLABEL2    NUMBER not null,
  SICOLLABEL2    NUMBER not null
)
tablespace CW_TS
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
alter table TBB_EQUALOUT
  add constraint PK_BB_EQUALOUT primary key (CYEAR,VCREPORTCODE,ISORTID)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_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 180K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
alter table TBB_FORMULA
  add constraint PK_BB_FORMULA primary key (CYEAR,VCREPORTCODE,SIROWLABEL,SICOLLABEL)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 120K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_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 30K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
alter table TBB_HEAD
  add constraint PK_BB_HEAD primary key (CYEAR,VCREPORTCODE,SICOLLABEL)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 30K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_ITEM
(
  CYEAR        CHAR(4) not null,
  VCREPORTCODE VARCHAR2(10) not null,
  SIROWLABEL   NUMBER not null,
  SICOLLABEL   NUMBER not null,
  VCITEMNAME   VARCHAR2(100) ,
  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 50K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
alter table TBB_ITEM
  add constraint PK_BB_ITEM primary key (CYEAR,VCREPORTCODE,SIROWLABEL,SICOLLABEL)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 40K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_REPORT
(
  CYEAR        CHAR(4) not null,
  VCREPORTCODE VARCHAR2(10) not null,
  VCREPORTNAME VARCHAR2(50) not null,
  CREPORTTYPE  CHAR(4) not null,
  BTOTAL       NUMBER default -1,
  BCOLLECT     NUMBER default -1,
  BMERGE       NUMBER default -1,
  BANALYSIS    NUMBER default 0,
  SISERIAL     NUMBER not null,
  ID           NUMBER default 0,     /*报表显示顺序*/
  TYPECODE     CHAR(2) not null     
)
tablespace CW_TS
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
alter table TBB_REPORT
  add constraint PK_BB_REPORT primary key (CYEAR,VCREPORTCODE)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_REPORTDATA<<YEAR>>
(
  REPORTCODE VARCHAR2(10) not null,
  ENTERCODE  VARCHAR2(25) not null,
  MONTH      NUMBER not null,
  IROWLABEL  NUMBER not null,
  COLLABEL   NUMBER not null,
  CELLDATA   NUMBER(15,4) default 0           /*单元数据*/
)
tablespace CW_TS
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 270K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
alter table TBB_REPORTDATA<<YEAR>>
  add constraint PK_BB_REPORTDATA<<YEAR>> primary key (REPORTCODE,ENTERCODE,MONTH,IROWLABEL,COLLABEL)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 340K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table tBB_ReportRemark<<YEAR>>
(
  REPORTCODE VARCHAR2(10) not null,
  ENTERCODE  VARCHAR2(25) not null,
  MONTH      NUMBER not null,
  IROWLABEL  NUMBER not null,
  COLLABEL   NUMBER not null,
  TextDATA   VARCHAR2(100)           /*单元数据*/
)
tablespace CW_TS
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 270K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
alter table tBB_ReportRemark<<YEAR>>
  add constraint PK_BB_ReportRemark<<YEAR>> primary key (REPORTCODE,ENTERCODE,MONTH,IROWLABEL,COLLABEL)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 340K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_REPORTMODE
(
  CYEAR        CHAR(4) not null,
  CMONTH       CHAR(2) not null,
  VCREPORTCODE VARCHAR2(50) not null,
  LCONTENT     LONG RAW,
  LENGTH       NUMBER(10) default 0 not null
)
tablespace CW_TS
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 7340K
    next 10K
    minextents 1
    maxextents unlimited
    pctincrease 0
  );
alter table TBB_REPORTMODE
  add constraint PK_BB_REPORTMODE primary key (CYEAR,CMONTH,VCREPORTCODE)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_TOTALCOMPANY
(
  CYEAR        CHAR(4) not null,
  VCREPORTCODE VARCHAR2(10) not null,
  VCCOMPANIES  VARCHAR2(255) not null,
  VCTOTALCODE  VARCHAR2(10) not null
)
tablespace CW_TS
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents unlimited
    pctincrease 0
  );
alter table TBB_TOTALCOMPANY
  add constraint PK_BB_TOTALCOMPANY primary key (CYEAR,VCREPORTCODE)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_TOTALMODE
(
  CYEAR            CHAR(4) not null,
  VCTOTALCODE      VARCHAR2(10) not null,
  VCTOTALNAME      VARCHAR2(20) not null,
  VCTOTALCOMPANIES VARCHAR2(255),
  VCTOTALCODES     VARCHAR2(255),
  OFFSETFLAG       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
  );
comment on column TBB_TOTALMODE.OFFSETFLAG
  is '汇总抵消资产负债表标志';
alter table TBB_TOTALMODE
  add constraint PK_BB_TOTALMODE primary key (CYEAR,VCTOTALCODE)
  using index 
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );
create table TBB_REPORTTYPE
(
  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_BB_REPORTTYPE on TBB_REPORTTYPE(CYEAR,TYPECODE)
  tablespace CW_TS
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 10K
    next 10K
    minextents 1
    maxextents 121
    pctincrease 0
  );

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -