Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to filter 2 tables with the help of another one ?

Hi,

I've Three tables : TableA, TableB, TableC. They have a common field : KeyField.

I want to keep only lines of TableB and TableC where KeyField value exist in TableA.
My question is what is the best solution to do it ?

The only way I found, for the moment is to use :

Load * From TableA

Left Keep
Load * From TableB

Temp:
Noconcatenate Load * resident TableA
Left Keep Load * From TableC

Drop Table Temp;

It works, but I think it's a bit complex (and not optimized).

Is someone have a better idea ?

Thanks

Best regards

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

You can specify TableA in your left keep, which eliminates the need in loading it twice:

left keep (TableA) load ...

cheers,

View solution in original post

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

You can specify TableA in your left keep, which eliminates the need in loading it twice:

left keep (TableA) load ...

cheers,

johnw
Champion III
Champion III

LOAD * FROM TableA;
LOAD * FROM TableB WHERE EXISTS(KeyField);
LOAD * FROM TableC WHERE EXISTS(KeyField);

Or have I misunderstood the requirement?

Not applicable
Author

Thanks,

That's exactly the answers I need !

Regards