• Jeff,

    The main reason for using a sequence table is so that each store and even each register can have their own sequence of tickets.

    The ticket numbers for the stores might look like:

    01-10001 (Store 1)

    02-20001 (Store 2)

    or

    01-02-10001 (Store 1 Station 2)

    03-01-30001 (Store 3 Station 1)

    and so forth.

    The sequence table has 1 row per store (if it's done by store) or 1 row per store/register (if it's done by register). Each row has the next ticket number for that store (or register).

    There is a function that will increment the numeric part of the ticket number after the hyphen or last hyphen.

    It makes for ticket numbers that are easy to eyeball if need be.

    Like I said, we've never had any trouble with blocking since even with 10 stores and 20 registers apiece it's really not that much activity in the database world. It's still customers checking out so it's no big deal.

    Todd Fifield