I'd like to increment a string value in MySQL. It will be used in a query to get the first available value.
I tried CONV(...) with base 36 but it does not cover every case. The string can have a different structure depending on some internal parameters.
Possibles structures :
pattern | sample | incremented
----------------------------|--------------|-------------------
([0-9]+) | 1239 | 1240
([A-Z]+) | ABCD | ABCE
([0-9]+)([A-Z]+) | 1234A | 1234B
([A-Z]+)([0-9]+) | ABCD1 | ABCD2
([A-Z]+)-([0-9]+)-([A-Z]+) | ABCD-1239-Z | ABCD-1240-A
etc. | |
Is it possible in MySQL?