Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2010
    Posts
    4

    Unanswered: Unique Sequential Numbers

    Hi,

    I'm not sure whether this is the best place for this question as it could fall into several databases but here goes anyway.

    I am after some advice on creating unique numbers which are sequential. For example, I need to generate numbers in the format 10-0000. The first two digits are the last two digits of the year followed by a dash and then a sequential number.

    Take a scenario where a user takes the first number (10-0000) and another user takes the second number (10-0001) but the first user cancels what they are doing but the second user saves. We now have a non-sequential number. Take 10s of people taking numbers, some saving and some not, then we have a lot of unused numbers.

    How is this best addressed; with a pool of unused numbers which must be used before a new one is created, perhaps???

    To compound the problem what if there are unused numbers from one year and the year changes?

    Anyone have any experience of this?

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    At what point in this process does the sequential-ness start to matter? It obviously can't matter at the time of input, since a user can choose whether or not they want to save. Does the sequence matter at the end of the day, month, quarter, year, or some other period?

    Just an observation, but this kind of numbering scheme is a problem waiting to happen. Unless there is some truly COMPELLING reason for doing this, I would avoid it like the plague!

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Quote Originally Posted by cosmarchy View Post
    The first two digits are the last two digits of the year followed by a dash and then a sequential number.
    Sigh. Have we learned nothing from the lessons of Y2K?
    90 years from now when civilization collapses in a smoldering chaotic heap*, just remember that I warned everybody.

    The Blindman Has Spoken.

    *Coincidentally, "Smoldering Chaotic Heap" is the patented storage engine for Lotus Notes.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Sep 2010
    Posts
    4
    Quote Originally Posted by Pat Phelan View Post
    At what point in this process does the sequential-ness start to matter? It obviously can't matter at the time of input, since a user can choose whether or not they want to save. Does the sequence matter at the end of the day, month, quarter, year, or some other period?

    Just an observation, but this kind of numbering scheme is a problem waiting to happen. Unless there is some truly COMPELLING reason for doing this, I would avoid it like the plague!

    -PatP
    Thanks for your reply, Pat. I was afraid you'd say that as I was beginning to come to that conclusion myself!! It really only becomes important around once a year when the auditor asks where missing number are (is there a user error or database error!!)

    Quote Originally Posted by blindman
    Sigh. Have we learned nothing from the lessons of Y2K?
    90 years from now when civilization collapses in a smoldering chaotic heap*, just remember that I warned everybody.

    The Blindman Has Spoken.
    LOL I don't expect anything I design to last long enough to have to worry about the last two digits of the year

  5. #5
    Join Date
    Sep 2010
    Location
    Victoria, Australia
    Posts
    4

    Wink The quick wears off, but the dirty lingers on...

    Quote Originally Posted by cosmarchy View Post
    ...
    LOL I don't expect anything I design to last long enough to have to worry about the last two digits of the year
    I've had quick and dirty programs come back to haunt me after 20 years...

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    If you think that the auditor gets testy about missing numbers, describe the scheme you are proposing and watch the reaction... From a safe distance... Maybe 30,000 feet or so.

    This kind of numbering scheme is specifically forbidden from audit use by GAAP. The concept of "renumbering" items to make them sequential destroys the ability to detect lost, voided, or destroyed items and that makes the number useless as an audit control.

    I used to live surrounded by auditors. Every so often I'd make a joke about this kind of idea just to watch the "new guy" go ballistic and start to foam at the mouth.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

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