Is there any way to create a temporary table according to a select with columns created dynamically, as shown in the examples below?
ex:
SELECT idCentroCusto, 'Dez/14', 'Jan/15', 'Fev/15', 'Mar/15', totalAnual
or
SELECT idCentroCusto, 'Dez/14', 'Jan/15', 'Fev/15', 'Mar/15', 'Abr/15', 'Mai/15', totalAnual
Since (as shown above) these Months / Year are dynamically created, according to the calendar parameter.