
/*------ ATD 418899 ------*/

IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'ITEMCLICOMPLEMENTO' and column_name = 'CODIGOMOTIVODESCONTO')
begin
	alter table ITEMCLICOMPLEMENTO add CODIGOMOTIVODESCONTO int
end
go

IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'CONTROLEDESCONTO' and column_name = 'CODPRO')
begin
	alter table CONTROLEDESCONTO add CODPRO char(5)
end
go

IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'CONTROLEDESCONTO' and column_name = 'ITEMPEDIDO')
begin
	alter table CONTROLEDESCONTO add ITEMPEDIDO int
end
go

update DADOADICIONAL set RDOMINIO = 16024 where OID = 40514 AND RDOMINIO = 7
go