I have a table (DataImportTable) that contains column names of the MainDataTable as its records - please see image: Target Column Table
I would like to use the above-mentioned column names in a query to look only them up from my MainDataTable.
The query that obviously doesn't work, however can explain what I am trying to achieve, can be seen below:
select (select TargetColumn from DataImportTable) from MainDataTable
I hope this makes sense and that someone can be of assistance.
Thank you in advance!