

IF OBJECT_ID('EST_PROD_IMP_PENDENCIA_CONSIGNET') IS NULL
begin 
	CREATE TABLE  EST_PROD_IMP_PENDENCIA_CONSIGNET(
		CD_CTR				INT IDENTITY(1,1) NOT NULL,
		CD_EMP				INT      NOT NULL,
		CD_FILIAL			INT      NOT NULL,
		CD_VD				INT      NOT NULL,
		CONTRATO			VARCHAR(100)COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS  NULL, 
		VALOR				MONEY	 NOT NULL,
		STATUS				INT		 NOT NULL,
		JUSTIFICATIVA		VARCHAR(200) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS NULL, 
		DT_CAD				DATETIME NOT NULL,
		CD_USU				INT		 NOT NULL,
		DT_CAD_RETORNO		DATETIME NULL,
		COD_RETORNO			INT		 NULL,
		DESC_RETORNO		VARCHAR(200) COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS,
		CONSTRAINT PK_EST_PROD_IMP_PENDENCIA_CONSIGNET PRIMARY KEY (CD_CTR , CD_EMP ) )
END 