title: Sorting Table Variables by Prefix/Starting Letter
body: <p>This is for a SAS table, so SQL commands would work, as well.</p>
  
  <p>I have a table with 300 variables; they have 5 different prefixes, which I would like to sort them by. I want them in a particular order (mtr prefix before date prefix), but alphabetical would be acceptable. </p>
  
  <p>I was thinking SQL would have something along the lines of: </p>
  
  <pre><code>Select mtr*, date* from Table
  </code></pre>
  
  <p>or</p>
  
  <pre><code>Select mtr%, date% from Table
  </code></pre>