if (contribuintes.NUMEROPOSTO) ='CENTRAL'if contribuintes.cod_rep_fiscal not inif contribuintes.nif <> deleted.nif
update contribuintesset nif = c.niffrom contribuintes cjoin inserted i on i.PrimaryKey = c.PrimaryKeywhere i.numeroposto = 'Central' update contribuintesset cod_rep_fiscal = c.cod_rep_fiscalfrom contribuintes cjoin inserted i on i.PrimaryKey = c.PrimaryKeywhere i.cod_rep_fiscal not in (select codigo from V_RETURN_RF)
and i.numeroposto = 'Central'