Hi Team,
I have one requirement where i have 2 tables :
Cabinet master Table :
Cabinet | Outlet | Company Code |
---|---|---|
C1 | O1 | CC1 |
C2 | O2 | CC2 |
C3 | O3 | CC3 |
and Cabinet Transaction table : (Input Schema )
Cabinet | Outlet | CompanyCode | cal day |
---|---|---|---|
C1 | O5 | CC5 | 20140101 |
C2 | O2 | CC2 | 20140102 |
C3 | O3 | CC7 | 20140103 |
Now my requirement is :
I have to check whether the Cabinet is placed in the right outlet or not by performing the lookup on th Cabinet master and i need to display the Match ID
where it has to display the value as Y or N, Y means the Cabinet is placed in the correct outlet and N means the Cabinet is placed in the wrong Outlet ( By performing the lookup on the Cabinet Master Table ) . Now finally my outlput should display as
Calday | Cabinet | Outlet | MatchID | Correct Company code | Correct Outlet | |
---|---|---|---|---|---|---|
20140101 | C1 | O5 | N | CC1 | O1 | |
20140102 | C2 | O2 | Y | |||
20140103 | C3 | O3 | N | CC3 | O3 | |
Pls help me how to achieve this.
Regards,
Praveen.