Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
May 18th 10AM ET, Live Chat, bring your QlikView questions. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
eruditio
Partner
Partner

Temp table not dropping (Temp-1)

Hello,

I am facing a weird phenomena.

Assume this scenario:

Script 1:

Temp:

Load * Inline [

A,

x,

];

T1:

Load * Inline [

A, C,

x, z,

y,k,

x, b,

];

Right Keep ('T1')

Load

*

Resident Temp;

Drop Table Temp;

The Output: T1 linked to Temp-1with T1 reduced in content to only x values.

Script 2

Temp:

Load * Inline [

A,

x,

];

T1:

Load * Inline [

A, C,

x, z,

y,k,

x, b,

];

Right Keep ('T1')

Temp1:

Load

*

Resident Temp;

Drop Tables Temp, Temp1;

The Output: T1 with T1 reduced in content to only x values.

Usually this doens't happen with me(or I don't notice it:) ),  so can anyone share his insight?


Thanks,


Antoine

1 Solution

Accepted Solutions
Gysbert_Wassenaar

In the first script you don't specify a table name. Right Keep does keep the table, so it gets a name from Qlikview. Had you used right join instead you'd have only the reduced T1 left. This has the same effect as using right keep, giving the table the name Temp-1 and dropping Temp and Temp-1 at the end.


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
CELAMBARASAN

I dont understand the issue?

You gave the example. But I couldn't get the issue your facing.

Gysbert_Wassenaar

In the first script you don't specify a table name. Right Keep does keep the table, so it gets a name from Qlikview. Had you used right join instead you'd have only the reduced T1 left. This has the same effect as using right keep, giving the table the name Temp-1 and dropping Temp and Temp-1 at the end.


talk is cheap, supply exceeds demand

View solution in original post

eruditio
Partner
Partner
Author

I realise fully what you are telling me and it is correct. and makes sense...

thanks,

Antoine

eruditio
Partner
Partner
Author

Well, Try copying the script and running the routine for both scenarios.

     in the first one you will see a "new" table with a -1 index;

     in the second one, you will not see it.

I thought that when I issue the drop table, the original table and the resident table get dropped. Which is not the case.

So actually, I better understand now how resident load work. it actually duplicates the table, and not simply creates a reference.

swuehl
MVP
MVP

Just another note (if I understood correctly what you are trying to achieve):

You don't need a join / keep at all:

Temp:

Load * Inline [

A,

x,

];

T1:

Load * Inline [

A, C,

x, z,

y,k,

x, b,

] Where Exists(A);

Drop Table Temp;

CELAMBARASAN

Why you don't use Left Keep for this case

Temp:

Load * Inline [

A,

x,

];

Left Keep(Temp)

T1:

Load * Inline [

A, C,

x, z,

y,k,

x, b,

];

Drop Table Temp;

eruditio
Partner
Partner
Author

An even cleaner solution !

Thank you

Antoine


EDIT: mixed up with another post