Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
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
 Gysbert_Wassena
		
			Gysbert_WassenaIn 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.
 
					
				
		
 CELAMBARASAN
		
			CELAMBARASAN
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I dont understand the issue?
You gave the example. But I couldn't get the issue your facing.
 Gysbert_Wassena
		
			Gysbert_WassenaIn 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.
 
					
				
		
I realise fully what you are telling me and it is correct. and makes sense...
thanks,
Antoine
 
					
				
		
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
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
		
			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;
 
					
				
		
An even cleaner solution !
Thank you
Antoine
EDIT: mixed up with another post 
