Employee To Organization Heirarchy

Database
Enthusiast

Employee To Organization Heirarchy

I have an employee table where the organizational hierarchies have been flattened out.  The table contains EmpId, and OrgLvl_01 thru OrgLvl_10 columns.  Depending on the position of the employee in the company depends on how far out the OrgLvl columns are populated.

What is the most optimal way to select what organization each employee works in?

Thanks