Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

keep join.

how we can differentiate the keep join...

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

KEEP

Sales:

Load * Inline

[

  Customer, Sales

  A, 100

  B, 200

  C, 120

];

Left Keep(Sales)


Customer:

Load * Inline

[

  Customer, Name

  A, AAA

  B, BBB

  C, CCC

  D, DDD

];

Due to Left Keep, the second table (Customer) will load only those Customers which are having Sales from Sales Table.

Also, Keep will not join the two tables, but both table will be separate and associated with each other by Customer Field

If you use Left Join (Sales) instead of Left Keep (Sales), now the result is same for 2nd Table,,, i.e. only those customers would be loaded whoever are having sales from Sales Table but here both table are now joined and only Sales table exist at the end of the script..

View solution in original post

8 Replies
Not applicable
Author

Thanks.

MK_QSL
MVP
MVP

KEEP

Sales:

Load * Inline

[

  Customer, Sales

  A, 100

  B, 200

  C, 120

];

Left Keep(Sales)


Customer:

Load * Inline

[

  Customer, Name

  A, AAA

  B, BBB

  C, CCC

  D, DDD

];

Due to Left Keep, the second table (Customer) will load only those Customers which are having Sales from Sales Table.

Also, Keep will not join the two tables, but both table will be separate and associated with each other by Customer Field

If you use Left Join (Sales) instead of Left Keep (Sales), now the result is same for 2nd Table,,, i.e. only those customers would be loaded whoever are having sales from Sales Table but here both table are now joined and only Sales table exist at the end of the script..

ashfaq_haseeb
Champion III
Champion III

HI,

if it answered, then please close this thread.

Regards

ASHFAQ

qv_testing
Specialist II
Specialist II

Hi Hammad ,

Join: Join will combine the rows where the key values matches..

table1:                  table2:

ID  name              ID    Sal

1   ABC                1     10000

2   CBD                3     20000

left join Output:

ID    Name    sal

1      ABC     10000

2      CBD      -

3        -          20000

                 

Keep: Keep must prefixes with inner, left and Right keep

Left keep Output:

Table1:                       Table2

ID    Name                ID  Sal

1      ABC                  1    10000

2      CBD  

Hope it helps...............

Not applicable
Author

thanks it helps me.how to close the thread.

MK_QSL
MVP
MVP

Select Correct / Helpful answer from the answers given by members..

You can only select one Correct and Maximum Two helpful answers...

ashfaq_haseeb
Champion III
Champion III

Hi

Open this thread in new window,

You will find an option to mark it as correct and helpful.

Regards

ASHFAQ