Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hey, everyone!
I have an Issue:
I've 2 tables, like those:
| Table A | |
| Continent | Value | 
| Europe | 100 | 
| South America | 150 | 
| North America | 92 | 
| Table B | |
| Continent | Value | 
| Europe | 200 | 
| South America | 123 | 
| Central America | 200 | 
| Oceania | 105 | 
I want to unify those tables, but, keeping the values from Table A and bring from Table B, only the continents which doesn't exists in Table A.
Sincerely, Luiz Bisco
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be using Where not Exist()
Table:
LOAD * INLINE [
Continent, Value
Europe, 100
South America, 150
North America, 92
];
Concatenate(Table)
LOAD * INLINE [
Continent, Value
Europe, 200
South America, 123
Central America, 200
Oceania, 105
]
Where not Exists(Continent);
 
					
				
		
 oknotsen
		
			oknotsen
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Load both (naming the table TableA); they will auto concatenate since the fields have the same name.
Next, do this script:
TableEndresult:
noconcatenate
Load Continent,
sum(Value) as Value
resident TableA
group by Continent
;
drop table TableA;
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		May be using Where not Exist()
Table:
LOAD * INLINE [
Continent, Value
Europe, 100
South America, 150
North America, 92
];
Concatenate(Table)
LOAD * INLINE [
Continent, Value
Europe, 200
South America, 123
Central America, 200
Oceania, 105
]
Where not Exists(Continent);
