title: SQL Concatenate ids into a specific order
body: <p>I have the following query which works great, it puts all my ids in a comma separated list.</p>
  
  <pre><code>DECLARE @tmp nvarchar(max)
  SET @tmp = ''
          SELECT  @tmp = @tmp + cast(id as nvarchar(max)) + ', ' 
          FROM    dbo.property
  </code></pre>
  
  <p>I want to put my ids in alphabetical order but when I add order by p.Name it only gives my the top one result.</p>
  
  <p>How can I adapt my query to accomplish this?</p>