DROP TABLE CUSTOSUP_TMP
GO

CREATE TABLE CUSTOSUP_TMP
 (CDFILIAL     VARCHAR(4),
  CDFILCENTCMP VARCHAR(4),
  NRSEQPRELIST VARCHAR(10),
  DTINIVALITM  DATETIME,
  DTFINVALITM  DATETIME,
  CDPRODESTO   VARCHAR(10),
  NRCOLEPRECO  VARCHAR(10),
  CDREGIAO     VARCHAR(3),
  CDFORNECED   VARCHAR(21),
  CDPRODUTO    VARCHAR(10),
  CDMARCA      VARCHAR(5),
  VRPRECOUN    DOUBLE PRECISION,
  VRPRECECO    DOUBLE PRECISION,
  VRPRECOPI    DOUBLE PRECISION)
GO

CREATE INDEX CUSTOSUP_TMP_01 ON CUSTOSUP_TMP(CDFILCENTCMP, NRSEQPRELIST)

GO

DROP TABLE CUSTOSUPACOR_TMP
GO

CREATE TABLE CUSTOSUPACOR_TMP
 (CDFILIAL     VARCHAR(4),
  CDFILCENTCMP VARCHAR(4),
  NRSEQPRELIST VARCHAR(10),
  DTINIVALITM  DATETIME,
  DTFINVALITM  DATETIME,
  CDPRODESTO   VARCHAR(10),
  NRCOLEPRECO  VARCHAR(10),
  CDREGIAO     VARCHAR(3),
  CDFORNECED   VARCHAR(21),
  CDPRODUTO    VARCHAR(10),
  CDMARCA      VARCHAR(5),
  VRPRECOUN    DOUBLE PRECISION,
  VRPRECECO    DOUBLE PRECISION,
  VRPRECOPI    DOUBLE PRECISION)
GO

CREATE INDEX CUSTOSUPACOR_TMP_01 ON CUSTOSUPACOR_TMP(CDFILCENTCMP, NRSEQPRELIST)

GO