MySQL Forums :: Stored Procedures :: syntax error for simple IF - THEN


Advanced Search

syntax error for simple IF - THEN
Posted by: Jassm Rahma ()
Date: June 01, 2016 11:49AM

Hi,

I am trying to creat a simple IF - THEN in MySQL but getting a synax error message.

can anyone help please...

here is my statement:

IF EXISTS (SELECT payroll_id FROM payroll WHERE location_id = param_location AND payroll_month = param_month AND payroll_year = param_year) THEN
SET param_payroll_id = 0;
END IF;


Thanks,
Jassim

Options: ReplyQuote


Subject Views Written By Posted
syntax error for simple IF - THEN 3024 Jassm Rahma 06/01/2016 11:49AM
Re: syntax error for simple IF - THEN 351 Peter Brawley 06/01/2016 05:20PM
Re: syntax error for simple IF - THEN 360 Jassm Rahma 06/02/2016 12:41AM
Re: syntax error for simple IF - THEN 331 Peter Brawley 06/02/2016 02:15AM
Re: syntax error for simple IF - THEN 374 Peter Brawley 06/02/2016 07:38PM
Re: syntax error for simple IF - THEN 353 Jassm Rahma 06/02/2016 02:42AM
Re: syntax error for simple IF - THEN 315 Bryan Jones 06/03/2016 02:55PM


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.