Hello all,
Trying to create a query to rank some mines by production. The PRODUCTION table has MetalID columns thru MetalID_5(nulls allowed), but the Metal_Name is in the METAL table. Each row has only one instance of any given MetalID, but the ID can be in any of the MetalID_x columns depending on the primary metal for the mine. For example, a copper mine(MetalID1 = 205) may have gold as a byproduct(MetalID2 = 320), but another mine may have gold as the primary and copper as byproduct. I would like to have a MetalNamex(Metal1, Metal2, etc.) column with values that correspond to each MetalID column, so that a reader will not have to look up what the metals are.
Thanks