I'm new to SQL Server programming, so this may or may not be a stupid question.
So, first I do not know what my input table is (my task is supposed to work with ANY table).
Second, I get the column names using sp_help
and then I select only that column into another table. Now I need the rows from COLUMN_NAME
to be the names of god knows how many columns into some new table.
I tried something using PIVOT
, but I can't seem to make it work.