I need to generate a sequential alphanumeric Case number (format: AA-000001, AA-000002, AA-999999, AB-000001 etc.).
looking at the load on the application i am planning to use an external database.
This database will have a table with single column. (auto-incremental identity column)
I want to convert the integer obtained from datbase into alphanumeric number in above format.
when database returns 1 the case number will AA-000001,
when database returns 2 the case number will AA-000002,
when database returns 999999 the case number will AA-999999,
and when database returns 1000000 the case number should be AB-000001..
I am looking for a generic method to handle this condition in a way that the first two character also changes as below,
AA, AB....AZ,
BA, BB,....BZ, CZ.... etc.
Also if anyother better approach is welcomed...