Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Question about keep syntax

Hi everyone,

I am currently working on a data model that connects several tables together to be used in the same qlikview document. I am confused about how the keep syntax is supposed to work. In the script I have one table called Table1, and I would like to right keep Table2 on Table1 so that all of the data in Table1 stays, but only the rows with matching fields in Table2 stay. Would the proper way of doing this be:

Table1:

LOAD *

FROM (location)

Table2:

Right Keep (Table1)

LOAD*

FROM (location)

Thank you

1 Solution

Accepted Solutions
Gysbert_Wassenaar

If you want to keep all records from Table1 you would use a Left Keep. A Right Keep would keep all records from Table2 and only those from Table1 that have a matching field in Table2.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

If you want to keep all records from Table1 you would use a Left Keep. A Right Keep would keep all records from Table2 and only those from Table1 that have a matching field in Table2.


talk is cheap, supply exceeds demand
its_anandrjs

When you use Right Join the join as you told is perform but the you get two tables in the model while if you use right join the second table that is Table2 you not get because all its id available on the Table1.