Keep a table with the primary key (a non-data-bearing auto-incremented integer) as the sequential number, to ensure things don't go missing out of sequence.
For each ticket, create a unique number that's not already in the table. Use the random functions to generate a mix of numbers and letters, and check to ensure that's not already in use. (You could use GUIDs, but they are too long for practical use, I suspect.)
At the end of the day, you can match a list of the random "ticket numbers" against your list in primary key order to ensure no tickets were "misplaced."
On Wed, Oct 10, 2018 at 3:25 PM Frank Cazabon frank.cazabon@gmail.com wrote:
I have a client who issues tickets in numerical sequence (it's a pawnshop). The sequence helps them balance things back at the end of the day (read that as check for stealing) when checking the various parcels received for the tickets issued (they keep a copy of the ticket issued to their customer and at the end of the day sort them sequentially and read the numbers off the tickets to ensure they match the parcels). They are now not wanting the number printed on the ticket as their competitors may be able to get an idea from the sequential numbers how much business they are doing (by getting a ticket early in the morning and then one ate in the afternoon).
So, they have asked me to come up with a solution and I must admit that I am coming up blank.
Any ideas?
--
Frank.
Frank Cazabon
[excessive quoting removed by server]