I made a pivot (dynamic) and the result I store it in a variable, to show the result I made the following instruction:
exec (@queryimiu)
The result of the pivot I want to store it in a table called NewTable:
SELECT * INTO NuevaTabla FROM (
SELECT * FROM "pivote"
) AS tablefinal
I just do not know how to print the pivot (which is stored in the variable @queryimiu ) in the table in " pivote "