SQL-Script solutions
Posted in 1995
Topics: Migration, Import/Export & Data Conversion
Hi Dave, Vadim, Tracy, Bob, Benjamin, Sean and Todd
Your suggestions were all good but the best came from Vadim J. Nikitin
from Moskow. His suggestion is the only way where I didn't have to unload
and load a table. Every other solutions from you could also work with ISQL
but the problems are the restrictions in ISQL. Here comes the solution
from Vadim, which I tried out with success.
>Absender : nvj@dale.goodeal.msk.su (Vadim J. Nikitin)
>Datum : Fr 24.03.95, 12:48 (erhalten: 24.03.95)
>----------------------------------------------------------------------
>
> Hi !
>
> You can create temporary table _temp with two columns
> - primary key or ROWID of table to be modified;
> - serial(800)
> next
> INSERT INTO _temp (<primary key or ROWID>) SELECT ... FROM ...
> next
> ALTER TABLE ... ADD newkey SMALLINT
> next
> UPDATE ... SET newkey = (SELECT newkey FROM _temp WHERE ...)
THX
With the best wishes Toralf
## CrossPoint v3.02 ##