delete trigger error.
Posted by: Rob Thompson
Date: August 21, 2008 03:40AM
I have a very strange error on a simple trigger.
here is the trigger:
create trigger trDeletePoItem
before delete on tblPoItem for each row
INSERT INTO PurchaseOrder.tblPoAudit
intPoId = OLD.intPoId,
intProductMasterId = OLD.intProductMasterId,
intUserId = @intUserId,
intActionTypeId = FnGetPoActionId('PoItemDeleted');
The trigger compiles but I get the following error when trying to use it.
mysql> set @intUserId =1;
Query OK, 0 rows affected (0.00 sec)
mysql> truncate tblPoItem;
ERROR 1146 (42S02): Table 'PurchaseOrder.tblPoAudit' doesn't exist
mysql> describe PurchaseOrder.tblPoAudit;
Shows me that the table does exist.I have both insert and update triggers on that table which insert into the same audit table. I have also tried changing the 'before' to 'after'
thanks for any help
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.