Re: Help: Seting a column on an Insert Trigger on the same table
Posted in 1997
On 15 Oct 1997 13:36:27 GMT, Ignacio Mateos <imateos@adam.es> wrote:
Dear Ignacio,
Try something like this:
create trigger ins_trig on table_a referencing new as pre
for each row
(
execute procedure get_values (pre.a, pre.b, pre.c) intotable_a.d
You may or may not need a procedure to calculate the value based on
the other values but it helps and is more readable.
Mind you you cannot specify a value (even null) for colulmn d in the
insert statement or else this trigger will cause an error.
HTH
Jason
>I'm using Informix On Line 5.0 and need to give a value to a column
>that depends on other columns of the same table. Would like to do it
>automatically with an Insert Trigger.
>
>Is there any way I can do this?
>
>Apparently, I can only do an execute procedure Into in an Update Trigger
>not an Insert Trigger.
>
>I wonder if there is any smart way to have the Insert Trigger call
>an Update Trigger or something like that.
>
>Thanks for your interest.
Jason Harris
Informix DBA
Westpac Banking Corporation
NOTE: I add all these address at the bottom of people who spam me
Now when their extractors extract my e-mail address they will also
end up spamming each other.
wtcjr@ix.netcom.com
Shevsky@hotmail.com
speech@speechrecognition.com
SmartBiz@NevWest.com
slender@juice4u.net
sbliss@earthfriends.com
ron@moneyaction.com
removeme@gwh.net
rocco@lostvegas.com
market@DRAWBRIDGE.NET
Foxyrusski@mail-response.com
emaster@email-man.com
waynesmail@earthlink.net