RE: temp tables and serial columns
Posted in 2007
Why not do this:
Select into temp foo ...;
alter table foo modify (my_serial_column integer);
--EEM
________________________________________
From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org] On Behalf Of Bill64bits
Sent: Friday, March 09, 2007 11:34 AM
To: informix-list@iiug.org
Subject: temp tables and serial columns
We are on IDS 9.4 .
One thing that has always annoyed me about serial columns is that they become serial instead of integer
when you do a "select into temp x" .
If you are trying to duplicate a row for a customer, part, etc, except for the id , you cannot update the temp
to change the id to 0 and do an insert back into the table to force a new id to be generated.
Neither can you alter the temp table to make the column a plain old integer.
You have to create table blah ( ...) with an integer where the serial was and go from there.
That is a bit of a hassle if there are many columns.
Is there any relief for this issue in IDS 10 or IDS 11 ?
Like "into temp t with no serial" or something like that?