-- cria o campo FLAG_NOTA_FISCAL_CUPOM_APURACAO_ICMS na tabela PRC_FILIAL
GO
     IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'FLAG_NOTA_FISCAL_CUPOM_APURACAO_ICMS' AND OBJECT_ID = OBJECT_ID('PRC_FILIAL'))
     BEGIN
     	ALTER TABLE PRC_FILIAL ADD FLAG_NOTA_FISCAL_CUPOM_APURACAO_ICMS INT NULL;
     END