• Hi, not really the solution to your question.. but this is how we do it...

    We have a table with the following:

    TableName, CurrentNumber, EndNumber etc etc

    We created 1 Procedure, taking the table name (or any) as parameter:

    1. Based on parameter, read into the set up table and take "CurrentNumber"

    2. Update CurrentNumber by +1

    3. Output the CurrentNumber fetched in step1

    I guess the trigger can do something like that too... The good thing is that we can reset the number and we can add as many tables to the set up table