 
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE NAME  = 'EST_PROD_PRECO_PMPF_CPL')
BEGIN 
	CREATE TABLE EST_PROD_PRECO_PMPF_CPL( 
		CD_CTR		 INT			NOT NULl,
		CD_EMP       INT			NOT NULL,
		CD_PROD		 INT			NOT NULL,
		EAN			 VARCHAR (50)	COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS,
		VLR_PMPF	 MONEY			NULL,
		LABORATORIO  VARCHAR (150)	COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS,
		APRESENTACAO VARCHAR (150)	COLLATE SQL_LATIN1_GENERAL_CP1_CI_AS,
		CONSTRAINT PK_EST_PROD_PRECO_PMPF_CPL  PRIMARY KEY (CD_CTR,CD_EMP,CD_PROD),
		CONSTRAINT FK_EST_PROD_PRECO_PMPF_CPL_CD_CTR FOREIGN KEY (CD_CTR) REFERENCES EST_PROD_PRECO_PMPF (CD_CTR),
		CONSTRAINT FK_EST_PROD_PRECO_PMPF_CPL_EAN FOREIGN KEY (CD_EMP, CD_PROD, EAN) REFERENCES EST_PROD_CD_BARRA (CD_EMP, CD_PROD, CD_BARRA)
		)
		
END  