Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Ref numbers

  1. #1
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ref numbers

    Hi

    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?

    Many thanks

  • #2
    Regular Coder
    Join Date
    Sep 2007
    Posts
    120
    Thanks
    0
    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?

    Tom


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •