July 11, 2007 at 10:08 am
OK I perfectly understand this as I have had the same problem in the past. My solution was a new table that has the fields:
1. Company Code
2. String Identifier for the number range
3. The actual last number used
so every insert in any table that I need to have a serial number per company code, first updates this Number range table then uses the number value to insert.
July 11, 2007 at 5:37 pm
That's referred to as a "sequence table" and it one of the things that was suggested. But, you must be VERY careful how you do the update to it or you will create a world of deadlocks you never planned on. Also, it will require some pretty special handling if you want to insert more than one row at a time.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 12, 2007 at 2:32 am
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply