title: No column name was specified for column 2 of 't' T_SQL error
body: <p>PLease i want to return only debtorid from this T-SQL . It gives the error "
  No column name was specified for column 2 of 't'." My query is below. </p>
  
  <pre><code> with t as 
  (SELECT debtorid,MAX(dbo.FollowUp.followupdate) FROM dbo.FollowUp WITH (NOLOCK) WHERE
  ( dbo.FollowUp.FollowUpDate &gt;= '01-01-2011 00:00:00:000' and dbo.FollowUp.FollowUpDate &lt;= '01-13-2014 23:59:59.000'
  and Status = 'PTP')  GROUP BY [Status], DebtorId)
  
  SELECT t.debtorid FROM t;
  </code></pre>
  
  <p>WIth my little knowledge , i thought the above should work fine for me. however, it didn't.Any help would be appreciated. </p>