title: How can I get a MMYYYY format in SQL Server?
body: <p>Okay, the question is mildly misleading...  I know a couple different ways to get the MMYYYY format from a date, but it requires converting the string into VARCHAR.  While that's all fine and dandy, ordering the results is where it becomes a real pain.</p>
  
  <p>Here's what I'm using:</p>
  
  <pre><code>SELECT  
  CONVERT(VARCHAR(2),MONTH(TransactionDte)) + '/' + CONVERT(VARCHAR(4),YEAR(TransactionDte) AS MMYYYY  
  ,SUM(TransactionCt) AS TransCt  
  ,SUM(TransactionAmt) AS TransAmt  
  FROM Transactions  
  GROUP BY CONVERT(VARCHAR(2),MONTH(TransactionDte)) + '/' + CONVERT(VARCHAR(4),YEAR(TransactionDte)
  </code></pre>
  
  <p>The results appear as follows:<br>
  1/2010<br>
  1/2011<br>
  10/2010<br>
  10/2011<br>
  11/2010<br>
  11/2011<br>
  12/2010<br>
  12/2011<br>
  2/2010<br>
  2/2011<br>
  3/2010<br>
  3/2011<br>
  etc...  </p>
  
  <p>I'm trying them to order by the date ascending.  As you can see, they do not...  Is there a way to get what I'm trying to achieve?</p>
  
  <p>Thanks in advance!</p>