Oracle answer.
Re: How to use BASE36 conversion in Oracle / SQL?
I assume you have a CHAR column in the database so you can hold the alpha characters. I don't know how to go to base 36 without a special function, but it is easy to go to hex. This would give you a maximum of 'fffff' which is decimal 1048575, over ten times the number of values you have now.
SELECT TO_CHAR(1048575,'xxxxx') FROM dual
TO_CHAR(1048575,'XXXXX')
------------------------
fffff
SELECT TO_NUMBER('fffff','xxxxx') FROM dual
TO_NUMBER('FFFFF','XXXXX')
------------------------------
1048575
|