What's wrong with my Procedure?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AramAz
    New Member
    • Nov 2007
    • 9

    What's wrong with my Procedure?

    Hello eveerbody,

    I'm trying to make a procedure that will take care of an insertion.
    Unfortunately I get an error saying:
    "Script line: 5 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 22"

    I searched both on thescripts.com and other website and I can't get the right solution to this problem. It seems the error in line 5 is not really in line 5. Because there is nothing wrong with that.

    Note that I'm running this code inside MySQL Query Browser.
    Please if somebody tell me what is wrong with this code:
    Code:
    delimiter$$
    DROP PROCEDURE IF EXISTS SubmitInfo $$
    CREATE PROCEDURE SubmitInfo
    (
    id varchar(32)
    ,name varchar(50)
    ,surname varchar(45)
    ,stnumber varchar(7)
    ,dateOfGraduation integer
    ,graduationlevel varchar(45)
    ,currentaddress varchar(200)
    ,currentTel varchar(45)
    ,currentCareer varchar(45)
    ,email varchar(45)
    ,details varchar(500)
    ,pictureprovided integer
    ,emailpublic integer
    ,addtelpublic integer
    ,confirmed varchar(3)
    )
    BEGIN
    insert into alumni
    values (id
    ,name
    ,surname
    ,stnumber
    ,dateOfGraduation
    ,graduationlevel
    ,currentaddress
    ,currentTel
    ,currentCareer
    ,email
    ,details
    ,pictureprovided
    ,emailpublic
    ,addtelpublic
    ,confirmed)
    END$$
    
    delimiter;
    Thank you,
    I'm waiting for your responses.
    Aram Azhari
    Last edited by ronverdonk; Mar 1 '08, 03:31 PM. Reason: text make up
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    Line 37 should be terminated with a semi-column (end of SQL stmt)
    Code:
    ,confirmed);
    Ronald

    Comment

    • AramAz
      New Member
      • Nov 2007
      • 9

      #3
      Originally posted by ronverdonk
      Line 37 should be terminated with a semi-column (end of SQL stmt)
      Code:
      ,confirmed);
      Ronald

      Thank you very much. That was the last thing I would ever notice. You just made my day.


      Regards,
      Aram Azhari

      Comment

      • ronverdonk
        Recognized Expert Specialist
        • Jul 2006
        • 4259

        #4
        It's always the little things. Glad to be of help. See you around.

        Ronald

        Comment

        Working...