Error 1064,.... please Help
-
Hi, I am getting the above error on MySQL stored procedure.. Kindly help... here is the error followed by the code:
1064 - You have and error in your SQL syntax. check the manual that corresponds to your MySQL server version for the right syntax to use near '
END
ELSE
BEGIN
INSERT INTO salary_slips (salary_slip_month, salary_slip_y'
at line 13BEGIN
SET param_slip_released = FALSE;IF EXISTS (SELECT salary\_slip\_id FROM salary\_slips WHERE salary\_slip\_month = param\_slip\_month AND salary\_slip\_year = param\_slip\_year) THEN BEGIN SET param\_slip\_released = (SELECT salary\_slip\_released FROM salary\_slips WHERE salary\_slip\_month = param\_slip\_month AND salary\_slip\_year = param\_slip\_year); IF param\_slip\_released = FALSE THEN BEGIN SELECT \* FROM salary\_slips; END END ELSE BEGIN INSERT INTO salary\_slips (salary\_slip\_month, salary\_slip\_year) VALUES (param\_slip\_month, param\_slip\_year); END
END;
-
Hi, I am getting the above error on MySQL stored procedure.. Kindly help... here is the error followed by the code:
1064 - You have and error in your SQL syntax. check the manual that corresponds to your MySQL server version for the right syntax to use near '
END
ELSE
BEGIN
INSERT INTO salary_slips (salary_slip_month, salary_slip_y'
at line 13BEGIN
SET param_slip_released = FALSE;IF EXISTS (SELECT salary\_slip\_id FROM salary\_slips WHERE salary\_slip\_month = param\_slip\_month AND salary\_slip\_year = param\_slip\_year) THEN BEGIN SET param\_slip\_released = (SELECT salary\_slip\_released FROM salary\_slips WHERE salary\_slip\_month = param\_slip\_month AND salary\_slip\_year = param\_slip\_year); IF param\_slip\_released = FALSE THEN BEGIN SELECT \* FROM salary\_slips; END END ELSE BEGIN INSERT INTO salary\_slips (salary\_slip\_month, salary\_slip\_year) VALUES (param\_slip\_month, param\_slip\_year); END
END;
jrahma wrote:
VALUES (param_slip_month, param_slip_year)
I cannot see where you set the values of these parameters!
Never underestimate the power of human stupidity RAH