• Jampandu,

    Adding 2 letters means that I'll have to do additional testing and I have some urgent work to do. Try understanding the code and the solution should become evident.

    Aaron,

    I've never understood the advantage of sequences. I feel that it's only included to be "compatible" with Oracle.

    The first option that you mention seems to me as bad db design. If you're going to have different tables for each client, then you should have separate databases for them. Any code would need to be dynamic or repeated. Imaging having 100 clients using the same db. That only seems like a nightmare.

    The second option has the same disadvantages as identity columns. A rollback will create gaps in the sequence and you might not notice in time to correct it.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2