Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
New Contributor

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
Highlighted
MVP & Luminary
MVP & Luminary

Re: Load Resident - where clause

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
Highlighted
MVP & Luminary
MVP & Luminary

Re: Load Resident - where clause

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

Highlighted
Not applicable

Re: Load Resident - where clause

Hi,

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

Please find attachment.

Regards,

-Khaled.

Highlighted
New Contributor

Re: Load Resident - where clause

Gysbert,

thank for your speedy reply.

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

Problem solved.

Thanks!