title: PLSQL : need help to understand a CASE instructions in a ORDER BY
body: <p>I have a piece of code that had a ORDER BY  with a CASE in it:</p>
  
  <pre><code>                        ORDER BY
                          (
                              CASE
                                  WHEN r.id BETWEEN 900 AND 999 THEN '1AAAAA'
                                  ELSE '2'
                                      || upper(id.name)
                              END) ASC,
                          r.date DESC ;
  </code></pre>
  
  <p>Could someone explain: </p>
  
  <ol>
  <li>what is the meaning of the '1AAAAA' and '2' ?</li>
  <li>what is the meaning of     
  
  <blockquote>
    <p>|| upper(id.name)</p>
  </blockquote></li>
  </ol>