CREATE TABLE RELAT_COMPESTCONS
(CDFILIAL         VARCHAR2(04)           not null,
 CDPRODUTO        VARCHAR2(20)           not null,
 DTPOSICAO        DATE,
 QTESTOQDIA       FLOAT,
 QTESTDIACON      FLOAT,
 VRESTOQDIA       FLOAT,
 VRESTDIACON      FLOAT,
 constraint PK_COMPARA_ESTCONS primary key (CDFILIAL, CDPRODUTO, DTPOSICAO))

 /

CREATE TABLE RELAT_DIFMOVEST
(CDFILIAL         VARCHAR2(04)           not null,
 CDPRODMOVIEST    VARCHAR2(20)           not null,
 CDALMOXARIFE     VARCHAR2(6)            not null,
 CDLOCALESTOQ    VARCHAR2(6)             not null,
 DTLANCMOVIEST    DATE,
 QTESTOQDIA       FLOAT,
 QTDEMOVIEST      FLOAT,
 VRESTOQDIA       FLOAT,
 VRCUSTMOVIEST    FLOAT,
 constraint PK_RELAT_DIFMOVEST primary key (CDFILIAL, CDPRODMOVIEST, CDALMOXARIFE,
                                            CDLOCALESTOQ, DTLANCMOVIEST))

/                                             