Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone
I have two tables with same field. I want just combine two tables below, I used concatanate but ıt creates new row.
I want to just keep number of lines from table 1, combine tables if date and ID is equal.
Final table stated as below, the row number is still 3 and 13/08/2022- ID C amount2 100 added same row.
Please can you share in script?
Thanks a lot in advance
Table1: | Table2: | |||||||
Date | ID | Amount1 | Amount2 | Date | ID | Amount1 | Amount2 | |
12.08.2022 | C | 1 | 500 | 13.08.2022 | C | 100 | ||
13.08.2022 | C | 2 | ||||||
14.08.2022 | A | 3 | 200 | |||||
Final_Required_Table | ||||||||
Date | ID | Amount1 | Amount2 | |||||
12.08.2022 | C | 1 | 500 | |||||
13.08.2022 | C | 2 | 100 | |||||
14.08.2022 | A | 3 | 200 |
@EAK Please see the code below that I have used in the Back end to get the desired output:
NoConcatenate
Temp:
Load Date&','&ID as Key,
Amount1,
emptyisnull(Amount2) as Amount2
inline [
Date, ID, Amount1, Amount2
12.08.2022, C, 1, 500
13.08.2022, C, 2,
14.08.2022, A, 3, 200
];
left join (Temp)
Load
Date&','&ID as Key,
Amount1 as Amount11,
EmptyIsNull(Amount2) as Amount21
Inline [
Date, ID, Amount1, Amount2
13.08.2022, C, ,100
];
NoConcatenate
Temp1:
Load Key,
subfield(Key,',',1) as Date,
subfield(Key,',',2) as ID,
Amount1,
Coalesce(Amount2,Amount21) as Amount2
Resident Temp;
Drop field Key;
Drop table Temp;
Exit Script;
If this resolves your issue, please like and accept it as a solution.
thank you
@EAK Could you please like and accept it as a solution if it has a resolved your issue?