tenta assim: update REG54 set REG54.DATA = (SELECT REG50.DATA FROM REG50 WHERE REG50.NUMERO = REG54.NUMERO AND REG50.CNPJ = REG54.CNPJ) where REG54.DATA IS NULL