I have a table of new customers in an old legacy system which I need to calculate and update the CustomerID of which is Alphanumeric (5 letters 3 numbers). The legacy system already has a list of customerIDs. I want to update the new customersIDs in line with the existing sequence.
There may also be a 5 letter id which doesn't already exist in the list and would therefore start at 001.
I have the 5 letters for each new customer within a field. I just need to update with the next in sequence.
For example:
ExistingCustomerIDs
ALPHA001
ALPHA002
COLUM001
COLUM002
TESTI001
TESTI002
TESTI003
TESTI004
New Customers Table only contains the beginning 5 letters.
ALPHA (Should become ALPHA003)
ALPHA (Should become ALPHA004)
ALPHA (Should become ALPHA005)
COLUM (Should become COLUM003)
COLUM (Should become COLUM004)
TESTI (Should become TESTI005)
DANIE (Should become DANIE001)
DANIE (Should become DANIE002)