Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I am facing a (i'm sure it is) really easy problem...
I have two tables, let's say :
TableA :
LOAD
dim1,
dim2,
dim3,
metricA
FROM a.qvd (qvd);
TableB :
LOAD
dim1,
dim2,
metricB
FROM b.qvd (qvd);
In the end, i'd like to have a Table C with the following columns :
dim1,
dim2,
dim3,
metricA + metricB
Thanks a lot for your help.
Damien
If I understood correctly, you should be able to join the two tables and then do a rangesum of fields metricA and metricB, maybe like this (untested):
TableA :
LOAD
dim1,
dim2,
dim3,
metricA
FROM a.qvd (qvd);
left join (TableA) LOAD
dim1,
dim2,
metricB
FROM b.qvd (qvd);
Result:
LOAD *, rangesum(metricA,metricB) as SumOfMetrics resident TableA;
drop table TableA,
//drop fields metricA,metricB; //drop if needed