how do i write a condition/statement that gets me the results seen in final table below?
i have 2 tables, that have similar column, but in the final table i need to display the appropriate Description depending on the code and EDLType/codetype/DLType.
can someone help me please.
Final Table
| Table 1 | Table 2 |
---|
comp | EDLType | EDLCODE | Eployee# | Desc | 102 | D | 1 | 1000 | Portion | 102 | D | 2 | 1000 | salary | 102 | D | 3 | 1000 | A.Tax | 102 | D | 100 | 1000 | Support | 102 | E | 4 | 1000 | T.time | 102 | E | 1 | 1000 | RTime | 102 | E | 2 | 1000 | OT | 102 | L | 201 | 1000 | E.Portion | 102 | L | 200 | 1000 | C.Portion |
| Comp | ECode | Desc | codetype | 102 | 1 | RTime | E | 102 | 2 | OT | E | 102 | 3 | DT | E | 102 | 4 | T.time | E | 102 | 5 | autopay E |
| comp | DLCode | Desc | DLType | 102 | 1 | Portion | D | 102 | 2 | salary | D | 102 | 3 | A.Tax | D | 102 | 4 | B.Tax | D | 102 | 5 | C.Tax | L | 102 | 200 | C.Portion | L | 102 | 201 | E.Portion | L | 102 | 100 | Support | D |
|