Re: Triggers and stored procedures
Posted in 1998
Tony Edwards wrote: > > Hi, > > One of the developers at work came to me this one but I'm not an > SPL/trigger guru so I thought I would ask you lot... > > We have the following > > table aaaa > some id# > first name > last name > searchname > > trigger on insert into aaaa > call buildsearchname spl (some id, first name, last name) > > procedure buildsearchname > update searchname in aaaa > where someid = someid_arg > > When an insert hits the table we get error 747, which I can understand. I > thought the INTO variable statement in execute procedure would be the way > but this is only available for an update trigger:( You cannot reference the triggering table in any triggered SQL statement. There is an exception with UPDATE. Updated columns must be mutually exclusive > So people if you can think of any other way than the application calling > the stored procedure before the insert please reply... > > Thank you in advance. > Cheers, Tony.