MySQL Forums
Forum List  »  Firebird

Triggers problem for firebird to mysql v 5.0.19
Posted by: raid rair
Date: April 11, 2006 03:30AM

Hi

I have problem on triggers when i migrate from firebird 1.5x to mysql v5.0.19.

Below Trigger has no problem when copy from firebird to mysql and just modify some.

CREATE TRIGGER `DELQTY_AI` AFTER INSERT ON `DELQTY`
FOR EACH ROW
Begin
delete from BQTY1
where pono=new.pono
and fabpart=new.fabpart
and lot_no=new.lot_no
and co_loc=new.co_loc
and last_upddate <= new.last_upddate ;
End;


Here is a problem for more complex trigger and have error when compile

CREATE TRIGGER DELGM_AI AFTER INSERT ON DELGM
Begin
if (new.Tablename=`APCREDITOR`) then
Delete from `APCREDITOR`
Where co_code = new.co_code
and cred_code = new.del_code1
and co_loc = new.co_loc
and last_upddate < new.last_upddate;
if (new.Tablename=`BOLOT`) then
Delete from `BOLOT`
Where buy_code = new.del_code1
and bo_ord = new.del_code2
and lot_no = new.del_no1
and co_loc = new.co_loc
and last_upddate < new.last_upddate;
End;


This trigger cannot work, anyone can help how to make it work in mysql?

pls tks

Options: ReplyQuote


Subject
Views
Written By
Posted
Triggers problem for firebird to mysql v 5.0.19
12695
April 11, 2006 03:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.