Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm a QLikView learner.
I was just eager to know whether
Table:
Table1
Load * from Table1;
Join
Load * from Table2;
Join
Load * from Table3;
is same as-----------------------------------------------
Table1:
Load * from Table1;
Table2:
Load * from Table2;
Table3:
Load * from Table3;
Table4:
Load* Resident Table1;
Join
Load* Resident Table2;
Join
Load* Resident Table3;
Drop Tables Table1, Tabl2, Table3;
As long as Table1, Table2, Table3 don't have the same fields, so they would autoconcatenate in the second case...
And your resulting table is differently named in the two cases.
I do have a key with same name in 3 tables which joins 3 of the tables.
No, I was talking about autoconcatenation, QV will automatically concatenate tables when they show the same number and names of fields. This will not happen if the tables only share a subset of fields (like a single key field).
Hi,
I'm not able to understand the response.
Table1:
LOAD Field1,
Field2
FROM Table1;
Table2:
LOAD Field1,
Field2
FROM Table2;
After script execution, there will be only Table1 in your data model, because of auto-concatenating the two tables (same number of fields and fields have same name, all fields are keys).
If you want to prevent this, use NOCONCATENATE LOAD prefix:
Table1:
LOAD Field1,
Field2
FROM Table1;
Table2:
NOCONCATENATE
LOAD Field1,
Field2
FROM Table2;
But now the two tables are linked by two fields --> synthetic key is created.
So I think swuehl means that if the name of the fields between the three tables are exactly the same, they will auto-concatenate. These two can be safely considered equivalent:
Table:
Table1
Load * from Table1;
Join
Load * from Table2;
Join
Load * from Table3;
is same as-----------------------------------------------
Table1:
Load * from Table1;
Table2:
NoConcatenate
Load * from Table2;
Table3:
NoConcatenate
Load * from Table3;
Table4:
Load* Resident Table1;
Join
Load* Resident Table2;
Join
Load* Resident Table3;
Drop Tables Table1, Tabl2, Table3;
HTH
Best,
Sunny
THanq swuehl
THanq Sunny.
No problem Mark
Glad we were able to help.
Best,
Sunny