MySQL Forums
Forum List  »  Triggers

Re: #1064 - You have an error in your SQL syntax
Posted by: Peter Brawley
Date: May 23, 2017 10:56AM

> SET variable1 = (select dayJob from table1);

Wrong unless table1 has just one row; needs a Where clause.

> table1.newdate = DATE_ADD(table1.newdate,INTERVAL variable1 DAY)

See the manual page for Triggers for how to use the NEW keyword to set a column value in the current row.

Options: ReplyQuote

Written By
Re: #1064 - You have an error in your SQL syntax
May 23, 2017 10:56AM

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.