title: Pivot Table Error 56901 non-constant expression
body: <p>I need to create a pivot table of average salary in <code>Division_ID</code> as Row and <code>Job_ID</code> as Column using data in <code>employees2</code> table. So far I have:</p>
  
  <pre><code>SELECT * 
  FROM (
  SELECT Division_ID, Salary, Job_ID
  FROM Employees2
  )
  PIVOT (
  AVG(Salary) FOR Job_ID IN (ENG, TEC, MGR)
  )
  ORDER BY Job_ID
  </code></pre>
  
  <p>I get the error, "non-constant expression is not allowed for pivot|unpivot values"</p>
  
  <p>What am I doing wrong? Most the examples I can find online deal with Numerical values after the IN statement, do I need to do something different since im working with text/string?</p>