Hi I am wondering whether there is an sql code for the matching criteria below.
I have two tables eg A & B both are similar tables. i need to do a 1 to 1 matching. That is
where table Name A= table Name b
table DR/CR A<> table DR/CR b
table Amount A MINUS table Name b =0
if it matches the "Matched" and "unmatched" status must be updated in the expected result column.Kindly also note that I have many amounts in my tables.
table A
SN Name dr/cr amount Expected Result
1. aaa dr -1000 unmatched
2. aaa cr 1000 matched
3. aaa dr -1000 unmatched
4. bbb cr 1000 matched
5. aaa cr 1000 unmatched
6. aaa dr -1000 unmatched
7. bbb cr 1000 unmatched
table b
SN Name dr/cr amount Expected Result
1. aaa dr -1000 matched
2. aaa dr -1000 unmatched
3. aaa dr -1000 unmatched
4. bbb cr 1000 unmatched
5. bbb dr -1000 matched
Thanks for Helping. God bless.
Regards
I have two tables eg A & B both are similar tables. i need to do a 1 to 1 matching. That is
where table Name A= table Name b
table DR/CR A<> table DR/CR b
table Amount A MINUS table Name b =0
if it matches the "Matched" and "unmatched" status must be updated in the expected result column.Kindly also note that I have many amounts in my tables.
table A
SN Name dr/cr amount Expected Result
1. aaa dr -1000 unmatched
2. aaa cr 1000 matched
3. aaa dr -1000 unmatched
4. bbb cr 1000 matched
5. aaa cr 1000 unmatched
6. aaa dr -1000 unmatched
7. bbb cr 1000 unmatched
table b
SN Name dr/cr amount Expected Result
1. aaa dr -1000 matched
2. aaa dr -1000 unmatched
3. aaa dr -1000 unmatched
4. bbb cr 1000 unmatched
5. bbb dr -1000 matched
Thanks for Helping. God bless.
Regards