Subject Re: [firebird-support] Problem with SKIP keyword
Author Milan Babuskov
neczusia wrote:
> I have a problem with keyword 'SKIP'. I installed newer version of
> Firebird - 1.0. I have column in one of the tables named 'SKIP'. I
> cannot do anything with that column, because 'SKIP' is now new
> keyword! I want to 'move' data from that column to another and then
> drop it, but none of approaches works:

What exacly doesn't work? Do you get some errors or the server crashes
or what?

> 1.
> update TABLE_1 set NEW_SKIP = SKIP;

You need to commit here, since the data in skip column is still "used"
until you commit the transaction.

> alter table TABLE_1 drop SKIP;


> 2.
> update TABLE_1 set NEW_SKIP = TABLE_1.SKIP;
> alter table TABLE_1 drop TABLE_1.SKIP;

Now, this makes me wonder: Have you created a new column named NEW_SKIP.
Also, does the first statement fail or the second?

> 3.
> update TABLE_1 set NEW_SKIP = "SKIP";
> alter table TABLE_1 drop "SKIP";

If all fails, you can still create temporary table to copy the data,
drop the original table, recreate it with new_skip column, and then copy
the data from temporary table with (inserto into ... select from ...).
And drop the temporary table at the end.

--
Milan Babuskov
http://fbexport.sourceforge.net