Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Triggers involving 3 tables

Author  Topic 

tbits
Starting Member

5 Posts

Posted - 2009-10-06 : 01:51:03
Our problem is that we want to update a attribute based on a trigger of another table i.e. a customer orders something, it goes through a different table detailing the quantity of order, then subtracts that quantity from the warehouse stock count in the final table. Here's the trigger:

Delimiter |

Create trigger UpdateQTY before insert on invoice
FOR EACH ROW BEGIN
Update product set p_code = p_qoh - line.line_units

END
|

delimiter;


The error received is Error Code: 1235
This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-10-06 : 02:14:48
quote:
Originally posted by tbits

Our problem is that we want to update a attribute based on a trigger of another table i.e. a customer orders something, it goes through a different table detailing the quantity of order, then subtracts that quantity from the warehouse stock count in the final table. Here's the trigger:

Delimiter |

Create trigger UpdateQTY before insert on invoice
FOR EACH ROW BEGIN
Update product set p_code = p_qoh - line.line_units

END
|

delimiter;


The error received is Error Code: 1235
This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table'


This site is for MS SQL Server
Post your question at www.mysql.com

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -