• Did you consider sequence tables? I've not used them myself but would they have done what you wanted?

    https://msdn.microsoft.com/en-us/library/ff878091.aspx

    Jez