Hey.
i have a table that has the columns of A,B,C,D
and another table that one of the coulmns the VALUES of A,B,C,D
i am trying to subquery the 2nd table at the coulmn that stores the abcd.
and the result act as a column name for the 1st table.
Example :
SELECT (SELECT LetterType
FROM table2
WHERE ID=1 // JUST FOR THE EXAMPLE TO RETURN 1 ROW
) as ColumnName
FROM table1
WHERE ID=1 // same reason
the subquery can only return A\B\C\D which are the column names in table1.
can i do that? because it doesn't work and i don't know if i can even do that.
and if i can, do you know how can i achive this?
Thanks in advance,
Eric