Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2003
    Posts
    137

    Unanswered: http://www.dbforums.com/mysql/

    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 13



    BEGIN
    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;

  2. #2
    Join Date
    Mar 2004
    Posts
    480
    Change your delimiter see if that helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •