CREATE TABLE ETLCOMERCIALDT
(
   CDFILIAL              VARCHAR2(4),
   CDMOTICONT            VARCHAR2(2),
   CDSISTEMA             VARCHAR2(8),
   CDOPEREVOL            VARCHAR2(12),
   CDMOTIEVOCON          VARCHAR2(5),
   CDPAIS                VARCHAR2(4),
   SGESTADO              VARCHAR2(6),
   CDMUNICIPIO           VARCHAR2(10),
   CDPROCOMERCI          VARCHAR2(10),
   CDMTENCECONT          VARCHAR2(5),
   DSCONTAPRETLCOM       VARCHAR2(10),
   DSSTATETLCOM          VARCHAR2(12),
   DSTPCONTETLCOM        VARCHAR2(30),
   NMCONTATOETLCOM       VARCHAR2(100),
   ANFATETLCOM           VARCHAR(4),
   DSPERIFATETLCOM       VARCHAR(15),
   QTCONTETLCOM          FLOAT(126)
)
/

create index CVI00001_FK on ETLCOMERCIALDT (CDFILIAL asc)
/

create index CVI00002_FK on ETLCOMERCIALDT (CDMOTICONT asc)
/

create index CVI00003_FK on ETLCOMERCIALDT (CDSISTEMA asc)
/

create index CVI00004_FK on ETLCOMERCIALDT (CDOPEREVOL asc)
/

create index CVI00005_FK on ETLCOMERCIALDT (CDMOTIEVOCON asc)
/

create index CVI00006_FK on ETLCOMERCIALDT (CDPAIS asc)
/

create index CVI00007_FK on ETLCOMERCIALDT (SGESTADO asc)
/

create index CVI00008_FK on ETLCOMERCIALDT (CDMUNICIPIO asc)
/

create index CVI00009_FK on ETLCOMERCIALDT (CDPROCOMERCI asc)
/

create index CVI00010_FK on ETLCOMERCIALDT (CDMTENCECONT asc)
/

alter table ETLCOMERCIALDT
    add constraint FKCVI00001FILIAL foreign key  (CDFILIAL)
       references FILIAL (CDFILIAL)
/

alter table ETLCOMERCIALDT
    add constraint FKCVI00002MOTICONT foreign key  (CDMOTICONT)
       references MOTICONT (CDMOTICONT)
/

alter table ETLCOMERCIALDT
    add constraint FKCVI00003SISTEMA foreign key  (CDSISTEMA)
       references SISTEMA (CDSISTEMA)
/

alter table ETLCOMERCIALDT
    add constraint FKCVI00004OPERADOR foreign key  (CDOPEREVOL)
       references OPERADOR (CDOPERADOR)
/

alter table ETLCOMERCIALDT
    add constraint FKCVI00005MOTIEVOLCONT foreign key  (CDMOTIEVOCON)
       references MOTIEVOLCONT (CDMOTIEVOCON)
/

alter table ETLCOMERCIALDT
    add constraint FKCVI00006PAIS foreign key  (CDPAIS)
       references PAIS (CDPAIS)
/

alter table ETLCOMERCIALDT
    add constraint FKCVI00007PROCOMERCI foreign key  (CDPROCOMERCI)
       references PROCOMERCI (CDPROCOMERCI)
/

alter table ETLCOMERCIALDT
    add constraint FKCVI00008MOTIENCECONT foreign key  (CDMTENCECONT)
       references MOTIENCECONT (CDMTENCECONT)
/