Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi !
I have a table : Table1 which contains many informations like ID, date, name ... and another one : Table2 which contains the ID and the weight.
I would like to add, for each ID of the first table, the weight.
I tried with this script but it creates new rows in table1 and i don't know why. I want to keep the same number of row in table 1.
INNER JOIN (Table1)
LOAD
ID,
weight
RESIDENT Table2;
Thank you for your help.
 Gysbert_Wassena
		
			Gysbert_WassenaPerhaps you need to use the distinct keyword:
INNER JOIN (Table1)
LOAD DISTINCT
ID,
weight
RESIDENT Table2;
 
					
				
		
 swuehl
		
			swuehl
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Check if your second table shows several weight values per ID (maybe only for some of the IDs).
You probably should clean your data first then use a join or a MAPPING approach.
 Gysbert_Wassena
		
			Gysbert_WassenaPerhaps you need to use the distinct keyword:
INNER JOIN (Table1)
LOAD DISTINCT
ID,
weight
RESIDENT Table2;
 
					
				
		
 er_mohit
		
			er_mohit
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		see attached file
here
i think the valuein your name and date field having null for some ID
therfore it showing you
