473,386 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

What's wrong with my Procedure?

9
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:
Expand|Select|Wrap|Line Numbers
  1. delimiter$$
  2. DROP PROCEDURE IF EXISTS SubmitInfo $$
  3. CREATE PROCEDURE SubmitInfo
  4. (
  5. id varchar(32)
  6. ,name varchar(50)
  7. ,surname varchar(45)
  8. ,stnumber varchar(7)
  9. ,dateOfGraduation integer
  10. ,graduationlevel varchar(45)
  11. ,currentaddress varchar(200)
  12. ,currentTel varchar(45)
  13. ,currentCareer varchar(45)
  14. ,email varchar(45)
  15. ,details varchar(500)
  16. ,pictureprovided integer
  17. ,emailpublic integer
  18. ,addtelpublic integer
  19. ,confirmed varchar(3)
  20. )
  21. BEGIN
  22. insert into alumni
  23. values (id
  24. ,name
  25. ,surname
  26. ,stnumber
  27. ,dateOfGraduation
  28. ,graduationlevel
  29. ,currentaddress
  30. ,currentTel
  31. ,currentCareer
  32. ,email
  33. ,details
  34. ,pictureprovided
  35. ,emailpublic
  36. ,addtelpublic
  37. ,confirmed)
  38. END$$
  39.  
  40. delimiter;
  41.  
Thank you,
I'm waiting for your responses.
Aram Azhari
Mar 1 '08 #1
3 1101
ronverdonk
4,258 Expert 4TB
Line 37 should be terminated with a semi-column (end of SQL stmt)
Expand|Select|Wrap|Line Numbers
  1. ,confirmed);
Ronald
Mar 1 '08 #2
AramAz
9
Line 37 should be terminated with a semi-column (end of SQL stmt)
Expand|Select|Wrap|Line Numbers
  1. ,confirmed);
Ronald

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


Regards,
Aram Azhari
Mar 2 '08 #3
ronverdonk
4,258 Expert 4TB
It's always the little things. Glad to be of help. See you around.

Ronald
Mar 2 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Bob.Henkel | last post by:
I write this to tell you why we won't use postgresql even though we wish we could at a large company. Don't get me wrong I love postgresql in many ways and for many reasons , but fact is fact. If...
51
by: WindAndWaves | last post by:
Can anyone tell me what is wrong with the goto command. I noticed it is one of those NEVER USE. I can understand that it may lead to confusing code, but I often use it like this: is this...
3
by: Bruno BAGUETTE | last post by:
Hello, I have a PL/PGSQL stored procedure that makes me mad currently... (The stored procedure is a procedure that simulates a materialized view) It complains about a parse error when I call...
3
by: Peter | last post by:
Hello all, I have the following t-sql batch: create procedure stp_test ( @p_date1 as datetime = null, @p_date2 as datetime = null )
2
by: Benzine | last post by:
I am running MS SQL 2000. I recently ran a procedure in Query Analyzer from the Master db to clear out all replication information so I could start/recreate it again. After I ran this...
1
by: objectmodelol | last post by:
I just switched from MS SQL 2000/2005 to MySql. What's wrong with this stored procedure: DELIMITER $$ DROP PROCEDURE IF EXISTS `listing`.`SaveUser` $$ CREATE DEFINER=`root`@`localhost`...
5
by: MLH | last post by:
Access 97 does not provide a means of reading the most recent setting for SetWarnings Method. For example, if you had CBF that called a procedure in a global module and the following statement was...
66
by: John | last post by:
Hi What are the advantages actually achieved of managed code? I am not talking of theory but in reality. Thanks Regards
2
by: sonu173 | last post by:
Hi all, M create a procedure which will return the matching value . when m creating the procedure is beging crerated but its throwing an error while excuating... here is the script ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.