Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Error 1064,.... please Help

Error 1064,.... please Help

Scheduled Pinned Locked Moved Database
databasehelpmysqlsysadminannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jassim Rahma
    wrote on last edited by
    #1

    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;

    M 1 Reply Last reply
    0
    • J Jassim Rahma

      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;

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups