|
On Wed, 2005-12-07 at 15:48 -0600, Holden Tommy wrote: > Here's how I would handle this.. > > p next_eid b > d next_eid pi 11s 0 > > d result s 11s 0 > > c/exec sql > c+ Select Max(EID) into :result from wmerlgp > c/end-exec > /free > if SQLSTT='02000'; > result = 1; > else; > result += 1; > endif; > return result; > /end-free > p e > Thanks Tommy. So far, it's the only _working_ candidate. I ran it against a simple setgt/readp, and for 10K records, it ran about a third slower, but that seems acceptable at this time. According to debug, it does use the index to find the value, so it should not get appreciably slower as the file gets larger. Regards, Rich
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.