473,320 Members | 2,000 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,320 software developers and data experts.

Error in sql syntax - #1064

304 100+
DELIMITER $$

DROP PROCEDURE IF EXISTS `tableselect` $$
CREATE PROCEDURE `tableselect`()
BEGIN
select * from table_a;
END $$

DELIMITER ;

when i try to create a procedure by using the code specified above, i get this error.

#1064 - 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 'DELIMITER $$

DROP PROCEDURE IF EXISTS `tableselect` $$
CREATE PROCEDURE `' at line 1

i use mysql 5.0

any help would be appreciated.

thanks,
gomzi.
Apr 10 '07 #1
3 7103
Hi Gomzi,

Try this

mysql> DELIMITER $$
mysql> DROP PROCEDURE IF EXISTS `tableselect` $$ CREATE PROCEDURE `tableselect`()
Query OK, 0 rows affected, 1 warning (0.00 sec)

-> BEGIN
-> select * from table_a;
-> END;
-> $$
Query OK, 0 rows affected (0.00 sec)


Thanks,
Scarlet
Apr 11 '07 #2
masdi2t
37
DELIMITER $$

DROP PROCEDURE IF EXISTS `tableselect` $$
CREATE PROCEDURE `tableselect`()
BEGIN
select * from table_a;
END $$

DELIMITER ;

when i try to create a procedure by using the code specified above, i get this error.

#1064 - 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 'DELIMITER $$

DROP PROCEDURE IF EXISTS `tableselect` $$
CREATE PROCEDURE `' at line 1

i use mysql 5.0

any help would be appreciated.

thanks,
gomzi.

try cache your delimiter character with ;;

DELIMITER ;;

DROP PROCEDURE IF EXISTS `tableselect` ;
CREATE PROCEDURE `tableselect`()
....

DEMIMITER ;
Apr 13 '07 #3
masdi2t
37
try cache your delimiter character with ;;

DELIMITER ;;

DROP PROCEDURE IF EXISTS `tableselect` ;
CREATE PROCEDURE `tableselect`()
....

DEMIMITER ;
thus should change
Apr 13 '07 #4

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

Similar topics

0
by: Ola Ogunneye | last post by:
--=_104E0413.12733F99 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit I am running mysql 4.0.13 and using a weblog(Geeklog) to do my web. Using geeklog as been okay...
0
by: Ola Ogunneye | last post by:
--=_075912CF.F899D547 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello again all, I have created an account in the particular database that I was trying to...
0
by: Morten Gulbrandsen | last post by:
C:\mysql\bin>mysql -u elmasri -pnavathe company Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 to server version: 4.1.0-alpha-max-debug Type...
0
by: Morten Gulbrandsen | last post by:
mysql> USE company; Database changed mysql> mysql> DROP TABLE IF EXISTS EMPLOYEE; -------------- DROP TABLE IF EXISTS EMPLOYEE -------------- Query OK, 0 rows affected (0.00 sec)
13
by: wideangle | last post by:
Hello there! I know it's stupid, but when creating a table in a mysql (win32) database, it won't let me create this "mytable". Here goes my ER_PARSE_ERROR. mysql> CREATE TABLE `mytable` ( ->...
0
by: moishyyehuda | last post by:
whey when I execute this statment cursor.execute("""mysqlimport merchandise 1.txt""") I get this error ProgrammingError: (1064, "You have an error in your SQL syntax. Check the manual that...
3
by: dipperdan | last post by:
Hi, I'm getting an error 1064 when trying to delete some rows from a table. SQL is: DELETE FROM images WHERE image_id = 803 AND plant_num = 2277 LIMIT 1; DELETE FROM images WHERE image_id =...
2
by: tilenk | last post by:
Hello. I'm having a problem with restoring a mysql database for wordpress when moved to a new host. When I try to execute the following command DELIMITER ;; DELIMITER ; /*!40103 SET...
3
by: phobia1 | last post by:
Hi once again. We have just changed our ISP and things that worked fine now do not, Obviously its in the differences of MYSQL and PHP versions. Have fixed most of the problems but this UPDATE...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.