Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I'm having trouble and I don't see what i'm doing wrong.
Could someone shed some light?
I have a facts table with data from 2011, 2012 and 2013.
Since the new year has started and I only want to see data from 2 years, I thought to do a resident load to eliminate the data from 2011.
Here you see the piece of code.
// ================================ Data beperken op basis van jaar ============================================
INVDETyear:
LOAD
*
Resident INVDET
where Year > 2011;
drop Table INVDET;
If I execute this code, my facts table dissappears and I'm left with no data.
I've tried a lot of modifications on this code, nothing seems to work.
Am I missing something fundamental here?
Thanks for your help.
Since the fields in INVDETyear are exactly the same as in INVDET the tables are concatenated. Meaning no new table INVDETyear is actually created. By dropping INVDET you remove the only table you had. You can prevent this by specifying the noconcatenate keyword. That forces Qlikview to create a separate table INVDETyear.
INVDETyear:
noconcatenate LOAD
*
Resident INVDET
where Year > 2011;
drop Table INVDET;
Since the fields in INVDETyear are exactly the same as in INVDET the tables are concatenated. Meaning no new table INVDETyear is actually created. By dropping INVDET you remove the only table you had. You can prevent this by specifying the noconcatenate keyword. That forces Qlikview to create a separate table INVDETyear.
INVDETyear:
noconcatenate LOAD
*
Resident INVDET
where Year > 2011;
drop Table INVDET;
Hi,
Alternatively, I think you can also try giving a different name to the the resident table.
Please find attachment.
Regards,
-Khaled.
Gysbert,
thank for your speedy reply.
Now I see what you suggested, I should have known this myself.
Problem solved.
Thanks!