UPDATE PERMISSAO SET ACESSO = 31
WHERE OID > 7
AND ACESSO = 1 AND RESCOPO < 100000 
AND RESCOPO NOT IN (SELECT OID FROM LISTADEOBJETOS WHERE RCATEGORIA = 1085)
