Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What difference between keep and join
Thank you
Hi
T1:
LOAD * INLINE [
A, B
1, 1
1, 1
];
join(T1)
T2:
LOAD * INLINE [
C, D
1,1
1,1
];
If you join the above two tables ,the result will be in one table .All the rows in will be added to T1.
A | B | C | D |
---|---|---|---|
1 | 1 | 1 | 1 |
Keep:
This will function same as the join but keeps two tables separate.
left keep
B | ID |
---|---|
10 | 1 |
20 | 3 |
D | ID |
---|---|
1 | |
3 |
Go through below link
Hey,
Both join and keep performs the same task.
The only difference is that join keyword will combine your tables into a single table but keep will keep it as separate tables.
Thanks,
Hi Krishnakanth,
Join merges two tables and there will be only table after merging
Keep matches two tables and keeps two tables
FYI from Help..
The keep prefix is similar to the Join prefix. Just as the join prefix, it compares the loaded table with an existing named table or the last previously created data table.
But instead of joining the loaded table with an existing table, it has the effect of reducing one or both of the two tables before they are stored in QlikView, based on the intersection of table data. The comparison made is equivalent to a natural join made over all the common fields, i.e. the same way as in a corresponding join. However, the two tables are not joined and will be kept in QlikView as two separately named tables.
The keep prefix must be preceded by one of the prefixes Inner, Left or Right. The syntax is:
(inner | left | right) keep[ (tablename ) ]( loadstatement | selectstatement )
Example:
Inner Keep LOAD * FROM abc.csv;
Left Keep SQL SELECT * FROM table1;
tab1:
LOAD * FROM file1.csv;
tab2:
LOAD * FROM file2.csv;
.. .. ..
Left keep (tab1) LOAD * FROM file3.csv;
The join prefix joins the loaded table with an existing named table or the last previously created data table. The join is a Natural Join made over all the common Fields. The join prefix may be preceded by one of the prefixes Inner, Outer, Left or Right. When DISTINCT predicate is used in a LOAD statement, the resulting table becomes distinct. Any data added to the table also becomes distinct, regardless if the data is concatenated or joined.
The syntax is:
[inner | outer | left | right ]join [ (tablename ) ]( loadstatement | selectstatement )
Examples:
Join LOAD * FROM abc.csv;
Join SQL SELECT * FROM table1;
tab1:
LOAD * FROM file1.csv;
tab2:
LOAD * FROM file2.csv;
.. .. ..
join (tab1) LOAD * FROM file3.csv;
Regards
Krishna
Hi,
Please check this link. It has clearly explained. Thank you.
thanks to Enmanuel Santana (qlikview en espanol)