Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have two tables as shown bbelow:
Table A: Fields A,Fields B,Fields C,Fields D
Table B: Fields 1,Fields 2,Fields 3,Fields 4
I need to sum the value of
Fields B with Fields 2
Fields C with Fields 3
Fields D with Fields 4
how can i achieve this if i give common names its craeting sync tabels..is there any alternative..Please do help
Regards,
Prajna
There isn't any link between the two tables so you need to define it into your sum:
write in your expression:
Sum(Field B) + Sum(Field 2)
otherwise you must link the 2 tables.
Simply on expression write
Sum(Fields B) + Sum(Fields 2)
Sum(Fields C) + Sum(Fields 3)
Sum(Fields D) + Sum(Fields 4)
Maybe use common field names, but CONCATENATE your two tables.
I assume here that From Table A Fields A and From Table B Fields are the keys if they are unique then link this two tables or make join between then by checking the key
Eg:-
Table A:
Load
[Fields A] as ID,
[Fields B],
[Fields C],
[Fields D]
From location;
left join
Table B:
Load
[Fields 1] as ID,
[Fields 2],
[Fields 3],
[Fields 4]
From location;
Hi,
Create a common key field in both tables and join them.Later you can apply the condition FieldA + Field1 while loading.
Eg:
Source1:
LOAD * INLINE [
FieldA, FieldB,Key
100, 200,1
300, 400,2
];
Left Join
Source2:
LOAD * INLINE [
Field1, Field2,Key
400, 300,1
200, 900,2
];
LOAD FieldA+Field1 as Sum1,
FieldB+ Field2 as sum2
Resident Source1;