I can't wait to try it! Thanks Bill.

Sent from my iPhone

On Aug 12, 2010, at 5:58 AM, Bill Downall <[email protected]> 
wrote:

> Claudine,
> 
> Here's a trick: You do not have to autonum the column in your PK table to be 
> able to use NEXT to generate new, unique PK values.  
> 
> You can have a dummy column in a one-row table in your database, to which you 
> apply an autonum formula. 
> 
> CREATE TABLE dummy (autonumDummy INTEGER) 
> AUTONUM autonumDummy IN Dummy USING 1,1
> 
> Whether there's a row there or not, when you use the NEXT(dummy,AutonumDummy) 
> function no value will ever change within the dummy table. You will get a 
> unique value in your variable, and the SYS_NEXT column in some row in the 
> SYS_DEFAULTS table will change. You can safely use your unique value to 
> insert rows into your PK and FK tables.
> 
> Bill
> 
> On Wed, Aug 11, 2010 at 10:10 PM, Claudine Robbins 
> <[email protected]> wrote:
> Thanks for your response.
> 
> I'll give NEXT a try. I saw this in the help file but since I don't have an
> autonumbered column, I'll have to create one.
> 
> Claudine
> 

Reply via email to