IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_12'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_12]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_12'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_12]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_17'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_17]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_17'))
BEGIN
	 ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_17]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_175'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_175]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_175'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_175]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_18'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_18]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_18'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_18]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_20'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_20]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_20'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_20]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_Z_FRANCA_17'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_Z_FRANCA_17]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_Z_FRANCA_17'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_Z_FRANCA_17]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_Z_FRANCA_175'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_Z_FRANCA_175]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_Z_FRANCA_175'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_Z_FRANCA_175]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_Z_FRANCA_18'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_VD_Z_FRANCA_18]
END

IF EXISTS ( SELECT * FROM sys.objects WHERE type_desc LIKE '%CONSTRAINT' AND OBJECT_ID=OBJECT_ID('DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_Z_FRANCA_18'))
BEGIN
	ALTER TABLE [EST_PROD_PRECO_TBL_HIST_CPL] DROP [DF_EST_PROD_PRECO_TBL_HIST_CPL_VLR_FOR_Z_FRANCA_18]
END

 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_FOR_12'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_FOR_12 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_VD_12'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_VD_12 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_FOR_17'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_FOR_17 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_VD_17'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_VD_17 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_FOR_18'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_FOR_18 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_VD_18'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_VD_18 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_FOR_20'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_FOR_20
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_VD_20'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_VD_20 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_FOR_175'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_FOR_175 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_VD_175'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_VD_175 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_FOR_Z_FRANCA_17'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_FOR_Z_FRANCA_17 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_VD_Z_FRANCA_17'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_VD_Z_FRANCA_17 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_FOR_Z_FRANCA_175'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_FOR_Z_FRANCA_175 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_VD_Z_FRANCA_175'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_VD_Z_FRANCA_175 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_FOR_Z_FRANCA_18'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
 ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_FOR_Z_FRANCA_18 
end
 IF EXISTS (SELECT * FROM SYS.COLUMNS  WHERE NAME = 'VLR_VD_Z_FRANCA_18'  AND OBJECT_ID = OBJECT_ID('EST_PROD_PRECO_TBL_HIST_CPL'))
begin
	alter table EST_PROD_PRECO_TBL_HIST_CPL
	drop constraint DF_EST_PROD_PRECO_TBL_HIST_CPLVLR_VD_Z_FRANCA_18
	ALTER TABLE dbo.EST_PROD_PRECO_TBL_HIST_CPL drop column VLR_VD_Z_FRANCA_18 
end

