• Wow, that's really cool. It's pretty close to what I need, but I think there might be some problems. First, it's going to be used by a "human" - and if a record is deleted, it'll create a gap in the sequence which the human won't understand (or would expect to be able to fill by hand). Second, it's going to be used by a search - if I try to lookup a current number that's been deleted, it might show me a past number.

    Can you suggest a way that the system can "clean up" after itself? Maybe a trigger before insert that will purge old fakeids?

    Thanks!