Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
evelien_morel
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

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
3 Replies

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
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.

evelien_morel
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!

Community Browser