title: SQL pivoted table is read-only and cells can't be edited?
body: <p>If I create a VIEW using this pivot table query, it isn't editable.   The cells are read-only and give me the SQL2005 error:  "No row was updated.  The data in row 2 was not committed.  Update or insert of view or function 'VIEWNAME' failed because it contains a derived or constant field."</p>
  
  <p>Any ideas on how this could be solved OR is a pivot like this just never editable?</p>
  
  <pre><code>SELECT     n_id,
  MAX(CASE field WHEN 'fId' THEN c_metadata_value ELSE ' ' END) AS fId,
  MAX(CASE field WHEN 'sID' THEN c_metadata_value ELSE ' ' END) AS sID,
  MAX(CASE field WHEN 'NUMBER' THEN c_metadata_value ELSE ' ' END) AS NUMBER
  FROM   metadata
  GROUP BY n_id
  </code></pre>