Re: Reserved word is a column name - how to reference it in a trigger

From: Peter Schneider <>
Date: Thu, 19 Sep 2013 00:15:26 +0200
Message-ID: <l1d8pg$cq3$>

Am 18.09.2013 21:47, schrieb Walt:
> We have a table that has a column named "TYPE". I know this is bad
> practice and after considerable time and effort we have renamed it as
> "INTERVIEW_TYPE" and updated all our applications.

I wasn't even aware that it was at all possible to create a column named "TYPE".

> Except one, which hasn't been compiled in several years, and
> resurrecting it is not an easy task. As a temporary measure we'd like
> to just make a trigger to keep the old column in synch with the new one
> until we can find time to re-write or re-compile the old app.
> Unfortunately, the following code throws an error:


> Anybody know how to "escape" the word TYPE so that the plsql compiler
> interprets it as a column name instead of a keyword? Maybe do it by
> referencing the column number instead of name?
> I know, renaming the column and adapting all the apps is the real
> answer, but we'd like to just throw a trigger at it and buy some time
> for now. Thanks.

That column isn't there any more, as you renamed it.

Perhaps, if you could originally create it at all, try to recreate it as virtual column based on your new one. I didn't try this though...


Climb the mountain not to plant your flag, but to embrace the challenge,
enjoy the air and behold the view. Climb it so you can see the world,
not so the world can see you.                    -- David McCullough Jr.
Received on Thu Sep 19 2013 - 00:15:26 CEST

Original text of this message