Is there a way to use PIVOT syntax to accomplish the following?
--Unpivot the table.

SELECT Location, Account,Dept, Year, Month, Amount 
FROM 
   (SELECT Location, Account,Dept, Year, Month, Amount, January ... Dec
   FROM Table_A) p
UNPIVOT
   (Amount FOR Month IN 
      (January, Feb ... Dec)
)AS Table_B;
GO


reference: link