forums › forums › SQLyog › Using SQLyog › Error 1064
- This topic is empty.
-
AuthorPosts
-
-
March 15, 2006 at 9:29 pm #9538linhardtMember
I am using MyGeneration which generates the code necessary for stored procedures in .net. I was trying to run the code in SQLyog and it gets an error and I am not sure where I am going wrong. I am using MySQL 5.0.19 and SQLyog 5.02.
Code:DELIMITER $$DROP PROCEDURE IF EXISTS `proc_form_designerLoadByPrimaryKey`$$
CREATE PROCEDURE `proc_form_designerLoadByPrimaryKey`
(
p_form_id INT(11),
p_designer_id INT(11)
)
SQL SECURITY INVOKER
BEGINSELECT
form_id,
designer_id
FROM form_designer
WHERE
(form_id = p_form_id) AND
(designer_id = p_designer_id)
;END$$
DROP PROCEDURE IF EXISTS `proc_form_designerLoadAll`$$
CREATE PROCEDURE `proc_form_designerLoadAll`
()
SQL SECURITY INVOKER
BEGINSELECT
form_id,
designer_id
FROM form_designer;END$$
——————————————-
— NO UPDATE Stored Procedure Generated
— All Columns are part of the Primary key
——————————————-DROP PROCEDURE IF EXISTS `proc_form_designerInsert`$$
CREATE PROCEDURE `proc_form_designerInsert`
(
p_form_id INT(11),
p_designer_id INT(11)
)
SQL SECURITY INVOKER
BEGIN
DECLARE _NOW DATETIME;
SET _NOW = NOW();
INSERT
INTO form_designer
(
form_id,
designer_id
)
VALUES
(
p_form_id,
p_designer_id
);END$$
DROP PROCEDURE IF EXISTS `proc_form_designerDelete`$$
CREATE PROCEDURE `proc_form_designerDelete`
(
p_form_id INT(11),
p_designer_id INT(11)
)
SQL SECURITY INVOKER
BEGINDELETE
FROM form_designer
WHERE
form_id = p_form_id AND
designer_id = p_designer_id;END$$
DELIMITER;$$
Error Code : 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 'END$$
DROP PROCEDURE IF EXISTS `proc_form_designerLoadAll`$$
CREATE PROCEDURE `p' at line 1
(0 ms taken) -
March 15, 2006 at 9:50 pm #20879peterlaursenParticipant
Please read: http://www.webyog.com/faq/26_49_en.html.
So I just think you will need to change
Code:DELIMITER $$to
Code:DELIMITER $$;We discussed recently here http://www.webyog.com/forums/index.php?showtopic=1990
It would be nice if SQLyog supported both forms, but the DELIMITER statement is NOT part of the (my)SQL language, and any client can implement this as it likes.
An actually the concluding delimiter statement in your script follows Syntax that SQLyog supports – and not MySQL command-line syntax!!
-
-
AuthorPosts
- You must be logged in to reply to this topic.