I am trying to pivot into columns and I keep running into errors. I don't know what I am doing wrong. I tried the below code but I keep getting the red squiggly line under the "FOR" and the first word in the Parenthesis. Here is my code:
select d.City,d.Geographic_Region_Name, d.Site_Type
from Site_Profile as d
pivot
(City for Geographic_Region_Name in (City,Geographic_Region_Name,site_type) as pivotable;