title: Microsoft Access Cross-tab Query - Convert to MSSQL View
body: <p>I have the following table in access (odbc linked to actual mssql table)
  <img src="https://i.stack.imgur.com/i6eJZ.png" alt="Table"></p>
  
  <p>I can create a cross-tab query of the table to transform it into this format
  <img src="https://i.stack.imgur.com/4mY1h.png" alt="Cross-tab"></p>
  
  <p>Here is the sql that is generated in access:</p>
  
  <pre><code>TRANSFORM First(dbo_85137_PHY_Long_MP.[StatColumnValue]) AS FirstOfStatColumnValue
  SELECT dbo_85137_PHY_Long_MP.[StatDate]
  FROM dbo_85137_PHY_Long_MP
  GROUP BY dbo_85137_PHY_Long_MP.[StatDate]
  PIVOT dbo_85137_PHY_Long_MP.[StatColumnName];
  </code></pre>
  
  <p>I have tried to create the same sql within mssql to no avail (trying to create a view)</p>