I build a Pivot Table that returns a dynamic amount of columns. The amount of columns and their names are determined by the content of a table "Features" I populate previously. The records for the column "feature" are the column names of the Pivot Table.
I need to create a temp table I can insert the pivot result into. But how can I build a table with dynamic columns coming from the query Select feature from Features?