Need a help on this. This is a sample based on my requirement.
Question: Table 1 has total amount spend by shopper.
Table 2 has details for those expenses like categories.
As per table 1, Total amount spent by Peter is 90 for different category. By doing left join i am not able to get the right amount for category wise. Suggest me how to join the table to get the below output.
The solution looks correct, except perhaps you need a left join or an outer join and you may need to align the field names with your data.
>>This is not working. I am not able to get expected output.
Its not possible to solve a problem with this amount of information. What did you try? What did you get? What is wrong with the output you got.....
>>Also i cannot do distinct code here as my corporate account keep on adding some lines in the table1 with some new amounts.
This does not make sense to me. Adding new lines to table 1 does not conflict with using a distinct. The distinct prevents doubling of the data if a name or code is duplicated. If you don't like this you could use an ApplyMap to add the names to table2.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein