Copernicus98
IS-IT--Management
I need a query to get data from one table and order it by data from the columns of another table.
Heres what I have.
Table SegBc has the following data in two columns (BC and Demand are column names)
BC Demand
A 25
B 32
D 12
F 19
Z 30
Table BCOrder has just one row and the following columns (BC01, BC02, etc. are column names).
BC01 BC02 BC03 BC04 BC05 BC06
D Z B A F
I would like to get the records from SegBc and order it by the columns from BCorder.. So this is what I want
BC Demand
D 12
Z 30
B 32
A 25
F 19
Would appreciate a query to get this in one shot. Thanks very much.
Heres what I have.
Table SegBc has the following data in two columns (BC and Demand are column names)
BC Demand
A 25
B 32
D 12
F 19
Z 30
Table BCOrder has just one row and the following columns (BC01, BC02, etc. are column names).
BC01 BC02 BC03 BC04 BC05 BC06
D Z B A F
I would like to get the records from SegBc and order it by the columns from BCorder.. So this is what I want
BC Demand
D 12
Z 30
B 32
A 25
F 19
Would appreciate a query to get this in one shot. Thanks very much.