IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'CD_EMP' AND OBJECT_ID = OBJECT_ID('EST_RPS_NFSE_VALID'))
BEGIN
	ALTER TABLE EST_RPS_NFSE_VALID ADD CD_EMP integer  NOT NULL
END

IF NOT EXISTS (SELECT * FROM SYS.COLUMNS WHERE NAME = 'CD_FILIAL' AND OBJECT_ID = OBJECT_ID('EST_RPS_NFSE_VALID'))
BEGIN
	ALTER TABLE EST_RPS_NFSE_VALID ADD CD_FILIAL Integer   NOT NULL
END


