I need help with the following scenario:
I have a table that contains several columns (say 'fld1', 'fld2', 'fld3', 'fld4', 'fld5'). I also have another table which contains 2 columns (one being 'colname' and the other is 'colorder'). The data contained in this last table is as follows:
colname colorder
------- --------
fld1 2
fld2 1
fld3 4
fld4 3
What I want to do is formulate a SELECT statement on the first table using the column names contained as data in the second table. Can this be done?? Any help would be appreciated.
Scott
I have a table that contains several columns (say 'fld1', 'fld2', 'fld3', 'fld4', 'fld5'). I also have another table which contains 2 columns (one being 'colname' and the other is 'colorder'). The data contained in this last table is as follows:
colname colorder
------- --------
fld1 2
fld2 1
fld3 4
fld4 3
What I want to do is formulate a SELECT statement on the first table using the column names contained as data in the second table. Can this be done?? Any help would be appreciated.
Scott