I have created a pivot table in MS Sql Server 2008. How can I save the resulting pivot table to a permanent table?
SELECT *
FROM (SELECT yr as [year], lname as [player], avg_rating as Rating
FROM pool_ratings_yr1) as s
PIVOT
(SUM(Rating) FOR [player] in (greenleaf, maturo, allen, caras, concannon, taberski, mosconi, weston, seaback, deoro, blankenship, ralph, keough, kreuter, layton, hueston, rudolph, lauri) ) AS pool_pivot
Thanks,
Will
Use
SELECT INTO: