title: Converting number to string and adding a character in Oracle
body: <p>I am trying to add a character onto the end of a string using</p>
  <pre><code>CASE
  WHEN PackageNum = 2 THEN to_char(DespatchNum + 'B')
      WHEN PackageNum = 3 THEN to_char(DespatchNum + 'C')
         WHEN PackageNum = 4 THEN to_char(DespatchNum + 'D')
              WHEN PackageNum = 5 THEN to_char(DespatchNum + 'E')
             ELSE to_char(DespatchNum)
  </code></pre>
  <p>END as ShipmentReference,</p>
  <p>However I am getting the error</p>
  <blockquote>
  <p>ORA-01722: invalid number
  01722. 00000 -  &quot;invalid number&quot;
  *Cause:    The specified number was invalid.
  *Action:   Specify a valid number.</p>
  </blockquote>
  <p>DespatchNum is a number</p>
  <p>As an example, output would look like <strong>1234B</strong></p>
  <p>Help appreciated.</p>