I'm trying to create a sequence of numbers in string format, once I reach "99999" I want to continue the sequence using leading letters and will start base on my last value in database.

Example Sequence:

```
"00000" -> "00100" -> "99999" -> "A0001" -> "A9999" -> "B0001" -> "Z9999" -> "AA001" -> "ZZZZZ"

```

I have database and has row that has 00001 to 99995 values
and need to increment base on last number which is `99995`.

```
cmd.CommandText = "SELECT id from Table ORDER BY id desc LIMIT 1"
string lastvalue = cmd.ExecuteScalar().ToString();
int quantity = 10;
total = lastvalue + quantity;

for (i = lastvalue; i < total; i++)
{

    cmd.CommandText = "INSERT INTO Table VALUES ('"+i+"')";
    cmd.ExecuteScalar();

}

```

Expected Output

```
99996
99997
99998
99999
A0000
A0001
A0002
A0003
A0004
A0005

```