title: Error: Ambiguous column name
body: <p>Why am I getting this error?</p>
  
  <blockquote>
    <p>Msg 209, Level 16, State 1, Line 94<br>
    Ambiguous column name 'New Value'.</p>
  </blockquote>
  
  <p>Query:</p>
  
  <pre><code>SELECT  
      aho2.[Control Number] AS [Control Number],
      STUFF((SELECT '; ' + [Old Value] as [text()] 
             FROM #AuditHistoryOutput aho1 
             WHERE [aho1].[Control Number] = [aho2].[Control Number] 
             FOR XML PATH('')), 1, 1, '') [Unset Choice Value],
      STUFF((SELECT '; ' + [New Value] as [text()] 
             FROM #AuditHistoryOutput aho2, #AuditHistoryOutput aho1
             WHERE [aho1].[Control Number] = [aho2].[Control Number] 
             FOR XML PATH('')), 1, 1, '') [Set Choice Value]
  FROM 
      #AuditHistoryOutput aho2
  </code></pre>