/*
================================================================================
档案代号:ooo_file
档案名称:应收帐款系统科目余额档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table ooo_file
(
ooo01       varchar2(10) NOT NULL,   /*客户编号                               */
ooo02       varchar2(40) NOT NULL,   /*客户简称                               */
ooo03       varchar2(24) NOT NULL,   /*科目编号                               */
ooo04       varchar2(10) NOT NULL,   /*部门                                   */
ooo05       varchar2(4) NOT NULL,    /*币别                                   */
ooo06       number(5) NOT NULL,      /*年度                                   */
ooo07       number(5) NOT NULL,      /*期别                                   */
                                     /*期别 (0:年初余额 1/2/3..:各期余额)     */
ooo08d      number(20,6) NOT NULL,   /*原币借方金额                           */
ooo08c      number(20,6) NOT NULL,   /*原币贷方金额                           */
ooo09d      number(20,6) NOT NULL,   /*本币借方金额                           */
ooo09c      number(20,6) NOT NULL,   /*本币贷方金额                           */
ooo10       varchar2(10) NOT NULL,   /*营运中心编号                           */
ooo11       varchar2(5) NOT NULL,    /*帐别                                   */
ooo12       varchar2(1)              /*资料来源                               */
                                     /*资料来源 0:开帐 1:表月结               */
);

create unique index ooo_pk on ooo_file (ooo10,ooo11,ooo01,ooo02,ooo03,ooo04,ooo05,ooo06,ooo07);
alter table ooo_file add  constraint ooo_pk primary key  
(ooo10,ooo11,ooo01,ooo02,ooo03,ooo04,ooo05,ooo06,ooo07) enable validate;
grant select on ooo_file to public;
grant index on ooo_file to public;
grant update on ooo_file to public;
grant delete on ooo_file to public;
grant insert on ooo_file to public;