PeterDuthie
Programmer
Hello All. I have a stacked query which returns a series of rows of numbers (1-5) which refers to one of 5 columns in a table. How can I (or maybe I can't do this) code the column names with the numbers returned from the stacked query. Here's an example of what I want to do.
I want to end up with a query such as
SELECT MyColumn1 (or MyColumn2, or MyColumn3, or MyColumn4, or MyColumn5)
FROM tblTestColumns;
tblTestColumns has columns named MyColumn1 ... MyColumn5
So I want to do something like
SELECT MyColumn & str(NumberFromStackedQuery)
FROM tblTestColumns;
Any help greatly appreciated as always. Maybe, I'm tacking this the wrong way?
Cheers,
Peter
I want to end up with a query such as
SELECT MyColumn1 (or MyColumn2, or MyColumn3, or MyColumn4, or MyColumn5)
FROM tblTestColumns;
tblTestColumns has columns named MyColumn1 ... MyColumn5
So I want to do something like
SELECT MyColumn & str(NumberFromStackedQuery)
FROM tblTestColumns;
Any help greatly appreciated as always. Maybe, I'm tacking this the wrong way?
Cheers,
Peter