Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load Resident - where clause

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.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

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;


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

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;


talk is cheap, supply exceeds demand
Not applicable
Author

Hi,

Alternatively, I think you can also try giving a different name to the the resident table.

Please find attachment.

Regards,

-Khaled.

Anonymous
Not applicable
Author

Gysbert,

thank for your speedy reply.

Now I see what you suggested, I should have known this myself.

Problem solved.

Thanks!