Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I created 4 qvd's and pulled into another qvw file, but not sure where to drop the tables in the script.
ALL:
LOAD * from IMF.qvd(qvd);
JOIN LOAD * from WIF.qvd(qvd);
JOIN LOAD * from DIL.qvd(qvd);
JOIN LOAD * from DIH.qvd(qvd);
//DROP TABLE IMF;
//DROP TABLE WIF;
//DROP TABLE DIL;
//DROP TABLE DIH;
FINAL:
LOAD * RESIDENT ALL;
//DROP TABLE ALL;
I see ALL after executing the script, but I suppose to see FINAL table in the table viewer. And where to drop the tables?
Thanks,
Should you not be storing the ALL tables into a new QVD and then dropping the tables?
So
ALL:
LOAD * from IMF.qvd(qvd);
JOIN LOAD * from WIF.qvd(qvd);
JOIN LOAD * from DIL.qvd(qvd);
JOIN LOAD * from DIH.qvd(qvd);
STORE ALL INTO ALL.qvd(qvd);
//DROP TABLE IMF;
//DROP TABLE WIF;
//DROP TABLE DIL;
//DROP TABLE DIH;
FINAL:
LOAD * RESIDENT ALL;
//DROP TABLE ALL;
If you´re joining you don´t need to drop original tables
FINAL:
LOAD * RESIDENT ALL;
FINAL will not be generated because share same fields from ALL, so QlikView will concatenate records to ALL table
The problem is that your Load * from ALL, concatenates the result to the ALL table, ignoring the FINAL name. You can use a Noconcatenate Load * Resident All to prevent this. This will correct your script.
This is Qlikview's behavior (to concatenate tables with the same structur, unless you explicitly uses noconcatenate)
Eduardo
Clever is right. I couldn't see the need to load the data again.
Eduardo
ALL:
LOAD * from IMF.qvd(qvd);
JOIN LOAD * from WIF.qvd(qvd);
JOIN LOAD * from DIL.qvd(qvd);
JOIN LOAD * from DIH.qvd(qvd);
STORE ALL into ALL.qvd (QVD);
Drop Table ALL;
FINAL:
Load * FROM ALL;
=========================
Hope this helps..
No, this isn't "QlikView behavior" because QlikView should respect the different table name (per the documentation). It's an unfortunate effect that QlikTech refuses to fix for a very long time. For one reason or another...
But of course you're right. Add NOCONCATENATE to the FINAL table LOAD statement and the problem fixes itself.
I don't know why but we seem to keep adding keywords and statements to otherwise straightforward grammar-compliant scripts that succumb to side-effects...
Thanks All,
The reason behind using FINAL is I am creating few calculated fields.
ALL:
LOAD * from IMF.qvd(qvd);
JOIN LOAD * from WIF.qvd(qvd);
JOIN LOAD * from DIL.qvd(qvd);
JOIN LOAD * from DIH.qvd(qvd);
STORE ALL INTO ALL.qvd(qvd);
DROP TABLE ALL;
FINAL:
LOAD *,
few calculated fields here
RESIDENT ALL;
Got error message table not found, Even I tried with Load *, calculated fields from ALL;
Didn't work???
Thanks,
Hi
Well after you drop table ALL, then it's no longer resident. You would need a load from the qvd rather than from a resident table.. Or else use NoConcatenate as per several replies, and drop ALL after the resident load.
HTH
Jonathan
When you create one QVD based on four table files and create single table as ALL then after this call ALL.qvd not ALL which is in the application and as you use Drop table ALL it will not found. So open the ALL.qvd and make calculated fields see the load statement
ALL:
LOAD * from IMF.qvd(qvd);
JOIN LOAD * from WIF.qvd(qvd);
JOIN LOAD * from DIL.qvd(qvd);
JOIN LOAD * from DIH.qvd(qvd);
STORE ALL INTO ALL.qvd(qvd);
DROP TABLE ALL;
Noconcatenate //This is optional try top check while i believe not used here but try
FINAL:
LOAD *,
few calculated fields here
From ALL.qvd(qvd);