title: SQL Server: create manual sort order
body: <p>I am using the following stored procedure in order to fetch items from a table which works fine so far. 
  Is there a way to change this so that <strong>if col3 equals "n/a" then these values should get added at the end</strong> of the list and everything else gets sorted as is ?
  I want to achieve that the "n/a" values do not appear in the middle of my list because they start with "n".</p>
  
  <p>The same would also work if they get the "sortID" 99 assigned as all other items have a lower, numeric "sortID". </p>
  
  <p><strong>My SP (working):</strong> </p>
  
  <pre><code>ALTER PROCEDURE [dbo].[FetchItems]
  AS
  BEGIN
      SET NOCOUNT ON;
      SELECT      col1,
              col2,
              col3,
              col4,
              col5,
              sortID
      FROM        FetchItems
      WHERE       itemStatus = 'active'
      ORDER BY    sortID, col3
      FOR XML PATH('itemList'), ELEMENTS, TYPE, ROOT('ranks')
  END
  </code></pre>
  
  <p>Thanks for any help with this, Tim.</p>