Hello,
I've an application that keeps creating new columns in table1 and gives name to the new column prefix+number i.e. X_1, X_2, X_3, ...
and I store multiple aliases to these columns in another table but only the numbers without the prefix.
i.e. in the second table2, i have 2 columns, column1 is ID and this one = 1,2,3,... (which is X_1, X_2, X_3,.. but without the prefix) and column2 is the alias.
Now how can I select all columns from table1 but display the aliases as per table2 dynamically without mentioning the column names in table 1 as the query will be coded but the columns will be increased?