Hello everyone,
i come to know when we have to used keep or join in qlikview script.
i used both keep and join but i didnt found any difference(both are same)
EXCEPT
join gives result in a single table and keep gives result in two separate tables.
please let me know any difference is there.
Thank you
Best,
Prachi
Hello Prachi,
Below are few points:
1. In Join, you can perform OUTER JOIN (returns matching as well as non-matching data from both the tables); whereas KEEP don't have that option.
//Syntax of Keep
(inner | left | right) keep [(tablename ) ]( loadstatement | selectstatement )
//Syntax of Join
[inner | outer | left | right ]Join [ (tablename ) ]( loadstatement | selectstatement )
2. Post joining/relating two tables you don't want 2nd table in the Data Model then go ahead with JOIN else use KEEP (OUTER JOIN is exception).
3. INNER/LEFT/RIGHT KEEP exactly like an INNER/LEFT/RIGHT JOIN respectively except the two tables are not combined in the data model.
Hope this will be helpful.
Regards!
Rahul
Hi..Prachi,
Please refer attached file for more clarification.
Regard's
Sarvesh Srivastava
This two function works internally differently. Please go through QlikView 11 for Developers page 227-230
If your problem has been resolved then mark "Correct and Helpful" to close this thread.
Regard's
Sarvesh Srivastava
how i know when i have to used keep or join..
Hi Prachi,
It's depend on what scenario you have,
If you have one to many or many to many relationship then we can use KEEP, because if we use join the records will be duplicated.
Thanks,
Neha
1. Join – Join will merge tables into single table.
2. Keep – if we use keep word instead of join then it will make both tables as separate at the database
Regard's
Sarvesh Srivastava
Hello Prachi,
Below are few points:
1. In Join, you can perform OUTER JOIN (returns matching as well as non-matching data from both the tables); whereas KEEP don't have that option.
//Syntax of Keep
(inner | left | right) keep [(tablename ) ]( loadstatement | selectstatement )
//Syntax of Join
[inner | outer | left | right ]Join [ (tablename ) ]( loadstatement | selectstatement )
2. Post joining/relating two tables you don't want 2nd table in the Data Model then go ahead with JOIN else use KEEP (OUTER JOIN is exception).
3. INNER/LEFT/RIGHT KEEP exactly like an INNER/LEFT/RIGHT JOIN respectively except the two tables are not combined in the data model.
Hope this will be helpful.
Regards!
Rahul
thanks rahul..
welcome
-Rahul