<p>I have a bunch of records in several tables in a database that have a "process number" field, that's basically a number, but I have to store it as a string both because of some legacy data that has stuff like "89a" as a number and some numbering system that requires that process numbers be represented as number/year.</p>

<p>The problem arises when I try to order the processes by number. I get stuff like:</p>

<ul>
<li>1</li>
<li>10</li>
<li>11</li>
<li>12</li>
</ul>

<p>And the other problem is when I need to add a new process. The new process' number should be the biggest existing number incremented by one, and for that I would need a way to order the existing records by number.</p>

<p>Any suggestions?</p>

Maybe this will help.
Essentially:
```
```
SELECT process_order FROM your_table ORDER BY process_order + 0 ASC
```
```