I'm trying to use where exists in some load script:
IDPESSOA // this IDPESSOA is the client ID.
IDREVENDEDOR; // this IDREVENDEDOR is the dealer ID.
IDPESSOA AS IDREVENDEDOR,
NMPESSOA AS NMREVENDEDOR,
WHERE EXISTS (IDREVENDEDOR)
// Here is the problem: If I choose "WHERE EXISTS (IDPESSOA)" it'll filter by IDPESSOA from table Pedido (that's not what I want, because it will load only the clients IDs. I need to filter all IDREVENDEDOR from table Pedido, witch will bring me only the dealers ID's.
So... There is any way to apply Where Exists with renamed fields?