Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 6 of 6 total |
Generated Integer Field ignoring seed value |
Fri, Oct 8 2010 5:26 AM | Permanent Link |
Surjanto Kwe PT. Usahajaya Ficooprasional | Hi Tim,
Just downloaded 2.04 b4 trial and start all over again It seems that the SEED value is ignored for generated columns Regards, Surjanto |
Fri, Oct 8 2010 5:38 AM | Permanent Link |
Uli Becker | Surjanto Kwe,
> Just downloaded 2.04 b4 trial and start all over again Welcome and good luck! Good decision. > It seems that the SEED value is ignored for generated columns Have a look here: http://tinyurl.com/2v3m788 Regards Uli |
Fri, Oct 8 2010 6:18 AM | Permanent Link |
Surjanto Kwe PT. Usahajaya Ficooprasional | Thanks Uli,
So how do you guys deal with data migration ? This means that we have to create special script for all the running numbers in the table ... Regards, Surjanto |
Fri, Oct 8 2010 8:06 AM | Permanent Link |
Uli Becker | Surjanto,
> So how do you guys deal with data migration ? This means that we have to create special script for all the running numbers in the table ... Are you migrating from DBISAM? If so, the last Autoinc value should be "imported". For cases where I change the type to generated, I use this: SCRIPT BEGIN DECLARE MAXID integer; DECLARE ResultCursor CURSOR for stmt; prepare stmt from ' select max(MyID) as MySeed from MyTable'; open ResultCursor; Fetch First from Resultcursor(MySeed) into MAXID; unprepare stmt; Execute Immediate 'ALTER TABLE MyTable ALTER COLUMN MyID RESTART WITH ' + cast(MAXID as Varchar); END Regards Uli |
Sat, Oct 9 2010 1:06 AM | Permanent Link |
Surjanto Kwe PT. Usahajaya Ficooprasional | Uli,
I am importing from NexusDB, well thanks for your code, can get me started faster Regards, Surjanto |
Sat, Oct 9 2010 10:35 AM | Permanent Link |
Uli Becker | Surjanto,
> I am importing from NexusDB, well thanks for your code, can get me started faster You are welcome - if you need further help after migrating, just ask. Generally I always use a migration to "clean" my tables. Especially the collation of VarChar fields and the setting CaseSensitive or CaseInsensitive are important and can avoid a lot of trouble later. Also the indexes should match theses settings, otherwise queries can not be optimized as expected. Regards Uli |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |