Subject | Re: Problem with SKIP keyword |
---|---|
Author | neczusia |
Post date | 2003-10-15T07:48:52Z |
> > I have a problem with keyword 'SKIP'. I installed newer versionof
> > Firebird - 1.0. I have column in one of the tables named 'SKIP'.I
> > cannot do anything with that column, because 'SKIP' is now newthen
> > keyword! I want to 'move' data from that column to another and
> > drop it, but none of approaches works:crashes
>
> What exacly doesn't work? Do you get some errors or the server
> or what?The main probrem is with 'SKIP' word - the error message is:
----
Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, char 38
SKIP
Statement: update TABLE_1 set NEW_SKIP = SKIP;
----
It deesn't matter if I use skip in quotes, or without, with table
name before it - or without. It doesn't work at all!
I tried to execute queries using IBExpert, InteractiveSQL, InterBase
Interactive SQL - the error always is the same.
> > 1.still "used"
> > update TABLE_1 set NEW_SKIP = SKIP;
>
> You need to commit here, since the data in skip column is
> until you commit the transaction.It's not a problem with commiting - see above.
> > 2.NEW_SKIP.
> > 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
Yes, of course I did!
> Also, does the first statement fail or the second?Both - as I already mentioned: it's 'SKIP' word, which makes a
problem: I have column named SKIP, and SKIP is also new keyword in
Firebird.
> > 3.data,
> > 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
> drop the original table, recreate it with new_skip column, and thencopy
> the data from temporary table with (inserto into ... selectfrom ...).
> And drop the temporary table at the end.I don't think it would work - see error message at the top of my
post. I can't do anything with the column which name is 'SKIP',
because its name is taken as a keyword and whole SQL is rejected.
Neczka