Hi All,
I have a reference table with example values as below. I have inherited this data model
| ID | Type | Description | Short_Code
|
|---|
| 1 | Region | West | W |
| 2 | Region | East | E |
| 3 | Department | Information Technology | IT |
| 4 | Department | Research and Development | RD |
Then main table called Employees
| ID | Employee | Region | Department |
|---|
| 1 | Jack | West | Information Technology |
| 2 | Jill | East | Research and Development |
I need to have a query to show the below
| Name | Region ID | Department ID |
|---|
| Jack | W | IT |
| Jill | E | RD |
Please suggest what is the best approach for this. Note I cannot change the data model.
Thanks