S
selyob
I have a table containing serialized customer numbers that have to be
in the range of 1-9999. It has to be 1-9999 because it has to be
exported to an older COBOL database which only has 4 characters in the
field. I cannot assign a number twice to the same customer so the
customerid field index is set to no duplicates. When I have a new
customer I need a query to show all available serial numbers to display
in a combo box list. For example: below customer number 0003 is
available. In addition, if I delete a customer then I need to know this
customerid is available for the next person. I know it would work if I
just populated a table with one field with numbers 1-9999 and just
created a mismatch query but there should be a way to perform this
programatically. If lets say Visa did this with credit card numbers
they would have to have a table with millions of records containing
numbers that are available, so making a huge table just for record
numbers does not seem like the correct way to perform this. I also
have this running in a multi-user environment so I am trying to make it
avoid assigning the same number to two people.
0001 John Q Customer
0002 John Doe
0003
0004 Jane Doe
in the range of 1-9999. It has to be 1-9999 because it has to be
exported to an older COBOL database which only has 4 characters in the
field. I cannot assign a number twice to the same customer so the
customerid field index is set to no duplicates. When I have a new
customer I need a query to show all available serial numbers to display
in a combo box list. For example: below customer number 0003 is
available. In addition, if I delete a customer then I need to know this
customerid is available for the next person. I know it would work if I
just populated a table with one field with numbers 1-9999 and just
created a mismatch query but there should be a way to perform this
programatically. If lets say Visa did this with credit card numbers
they would have to have a table with millions of records containing
numbers that are available, so making a huge table just for record
numbers does not seem like the correct way to perform this. I also
have this running in a multi-user environment so I am trying to make it
avoid assigning the same number to two people.
0001 John Q Customer
0002 John Doe
0003
0004 Jane Doe