Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Lookup of reference data from another table

user5108636Sep 14 2016 — edited Sep 15 2016

Hi All,

            I have a reference table with example values as below. I have inherited this data model

IDTypeDescriptionShort_Code
1RegionWestW
2RegionEastE
3DepartmentInformation TechnologyIT
4DepartmentResearch and DevelopmentRD

Then main table called Employees

IDEmployeeRegionDepartment
1JackWestInformation Technology
2JillEastResearch and Development

I need to have a query to show the below

NameRegion IDDepartment ID
JackWIT
JillERD

Please suggest what is the best approach for this. Note I cannot change the data model.

Thanks

This post has been answered by John Thorton on Sep 14 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 13 2016
Added on Sep 14 2016
10 comments
1,131 views