Help-Sybase trigger to Informix trigger
Posted in 1995
I am trying to convert a sybase trigger to an Informix trigger,
but having problems with the sybase correlation names deleted
and inserted.
Let me describe the sybase trigger first:-
create trigger trig1
on table1 for update as
begin
exec updateProc /* Another procedure */
declare @utempstate int
update auxTable set end_state = (select @utempstate)
from deleted, auxTable
where deleted.stock_name='IX' and auxTable.end_state=NULL
insert into auxTable (attr1, attr2)
select (attr1,attr2) from inserted
where inserted.stock_name='IX';
END
I tried converting the above trigger to an Informix one using
REFERENCING clause. But since, the action part of an informix
trigger cannot have multiple statements like the sybase trigger,
I put the action part into another procedure and call the
procedure using EXECUTE PROCEDURE statement. But it is not
working. There is no error message, but the proposed action is
not taking place.
If you have done any such conversion, please let me know how
you did it or if there is any other way of solving this
problem. Any suggestions will be appreciated as I am in a
deadlock right now. Thanks in advance.
Shyama.