Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Ref numbers
01-16-2008, 11:34 AM #1
- Join Date
- Jan 2008
- Thanked 0 Times in 0 Posts
We are currently building a system where a user can submit a request and is given an automated ref number ie 1001 (we are using identity in sql to auto generate the ref number). If that request gets rejected a user can resubmit the request by entering their ref number which will bring up their previous request, amend it and submit it again however when they submit it it adds an a, b, c etc to the end of the request ie 1001a. We have created a separate table in the db to hold the re-submitted requests so as not to overwrite the previous requests and so it doesn't autogenerate a new number when another row is added to the table and so we can hold the alphanumeric characters.
Is this the right way to go about it? Can anyone give us an idea on how to add the alphanumeric character to the end of the ref number?
01-16-2008, 12:29 PM #2
- Join Date
- Sep 2007
- Thanked 3 Times in 3 Posts
Do a select count of all the requests with the same ref number.
If you have 4, the next one will be 5. Use the 5th letter of the alfabet.
But what happens when the 27th amendment happens?