MySQL Forums
Forum List  »  Triggers

Re: Calculation from time stamps through to amount due
Posted by: Peter Brawley
Date: September 04, 2016 04:53PM

Multiple SETs must be comma-separated, and a SQL statement must terminate with a semicolon:

set new.elapsed=(TIMESTAMPDIFF(MINUTE, new.start_time , new.end_time ) / 60.00), 
    new.amount_due=(new.elapsed * rate) ;

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Calculation from time stamps through to amount due
1037
September 04, 2016 04:53PM


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.