Subject | Re: [ib-support] Setting a generator to the maximum value of the primary key |
---|---|
Author | Helen Borrie |
Post date | 2001-10-05T12:42:32Z |
At 01:33 PM 05-10-01 +0100, you wrote:
H.
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Can someone tell me how to fix the following code please?Were the Author records committed before you tried to select max(AUTHOR_ID)?
>
>SET GENERATOR GEN_NEW_AUTHOR_ID TO (SELECT MAX(AUTHOR_ID) FROM AUTHOR);
>
>I have data that I have migrated from Paradox to InterBase. I am currently
>writing a script with all the updates that I am making to the data, as I
>will have to go through this process again.
>
>I am trying to create primary key generators that are set to the primary key
>value of the last record in the table, but the code above doesn't work.
H.
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________