Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Where Exists Renamed Field

Hi,

I'm trying to use where exists in some load script:

Pedido:

LOAD

IDPEDIDO,

IDPESSOA  // this IDPESSOA is the client ID.

IDREVENDEDOR; // this IDREVENDEDOR is the dealer ID.

SQL SELECT

IDPEDIDO,

IDPESSOA,

IDREVENDEDOR

FROM PEDIDO;

Revendedor:

LOAD

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.

SQL SELECT

IDPESSOA,

NMPESSOA

FROM PESSOA;

So... There is any way to apply Where Exists with renamed fields?

Thank You!

1 Solution

Accepted Solutions
Highlighted

Re: Where Exists Renamed Field

Try this may be:

Pedido:

LOAD

IDPEDIDO,

IDPESSOA  // this IDPESSOA is the client ID.

IDREVENDEDOR; // this IDREVENDEDOR is the dealer ID.

SQL SELECT

IDPEDIDO,

IDPESSOA,

IDREVENDEDOR

FROM PEDIDO;

Revendedor:

LOAD

IDPESSOA AS IDREVENDEDOR,

NMPESSOA AS NMREVENDEDOR,

WHERE EXISTS (IDREVENDEDOR, IDPESSOA)

SQL SELECT

IDPESSOA,

NMPESSOA

FROM PESSOA;

View solution in original post

2 Replies
Highlighted

Re: Where Exists Renamed Field

Try this may be:

Pedido:

LOAD

IDPEDIDO,

IDPESSOA  // this IDPESSOA is the client ID.

IDREVENDEDOR; // this IDREVENDEDOR is the dealer ID.

SQL SELECT

IDPEDIDO,

IDPESSOA,

IDREVENDEDOR

FROM PEDIDO;

Revendedor:

LOAD

IDPESSOA AS IDREVENDEDOR,

NMPESSOA AS NMREVENDEDOR,

WHERE EXISTS (IDREVENDEDOR, IDPESSOA)

SQL SELECT

IDPESSOA,

NMPESSOA

FROM PESSOA;

View solution in original post

Highlighted
Creator
Creator

Re: Where Exists Renamed Field

Sunny,

It works! Thank you!