Is there a routine already in place that will then find the last pk in the table and update Nextpk value with that number? Right now, doing that manually, I'm overlooking things.
It's a very old fashioned technique but I do this process in reverse. I run a program which SCANs the old table, SCATTER MEMVAR and do INSERT INTO <new table> FROM MEMVAR. This automatically calls CBNewID() and keeps everything in order. ©2002 graeme thomson |