IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.columns
					WHERE TABLE_NAME='EST_PROD_CD_BARRA' AND 
							COLUMN_NAME='EAN_VALIDO' )
BEGIN
	ALTER TABLE EST_PROD_CD_BARRA ADD EAN_VALIDO BIT NULL DEFAULT(0)
END
GO
UPDATE 
	est_prod_cd_Barra
SET 
	EAN_VALIDO = dbo.sp_valida_ean13(cd_barra); 
	 