List:General Discussion« Previous MessageNext Message »
From:anniyan Date:September 6 2007 2:24pm
Subject:Re: Problem creating a Trigger
View as plain text  
Thank you so much for the prompt response. Those comments were good to be
kept in mind always.
I actually realised the mistake I was making as soon as I posted the problem
here. So I managed the solve the problem.
However I have another problem which I need your ideas.
I have a table where prices for a few stock tickers are inserted. I have
another temp table which holds the prices for the max trade date. I have a
trigger which updates the temp table when there is a an insert into the main
prices table. This makes sure that I have the latest data for all the
tickers in the temp table.

Now I have a column called pricechange. I would like to calculate the
difference between pevious close price and today's close price in that
column. So theoretically speaking after the insert of new prices in the
prices table and I would like a trigger that will update the pricechange
with the price difference.
But I am unable to do it.

DBD::mysql::st execute failed: Can't update table 'tbl_prices' in stored
n/trigger because it is already used by statement which invoked this stored

pls advice
View this message in context:
Sent from the MySQL - General mailing list archive at

Problem creating a Triggeranniyan6 Sep
  • Re: Problem creating a TriggerRolando Edwards \(DBA\)6 Sep
  • Re: Problem creating a Triggeranniyan6 Sep
  • Re: Problem creating a TriggerMartijn Tonies6 Sep