Webyog Forums: Error 1064 - Webyog Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Error 1064

#1 User is offline   linhardt Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 09-March 05

Posted 15 March 2006 - 09:29 PM

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.

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
BEGIN

	SELECT
		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
BEGIN

	SELECT
		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
BEGIN

	DELETE
	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)

0

#2 User is offline   peterlaursen Icon

  • Advanced Member
  • PipPipPip
  • Group: Admin
  • Posts: 6,551
  • Joined: 01-June 03
  • Gender:Male
  • Location:Skagen, Denmark
  • Interests:well ... jazz/folk music, photography, chess, nature, ecology, history, bicycling, Highland Malts ... well, Lowland Malts and Cognac too actually :-) just wonder how I get the time to touch a computer! SQLyog and MONyog? no that's not interest, that's BASIC NEEDS simply!

Posted 15 March 2006 - 09:50 PM

Please read: http://www.webyog.co...q/26_49_en.html.
So I just think you will need to change
DELIMITER $$
to
DELIMITER $$;


We discussed recently here http://www.webyog.co...?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!!
Computers make your grey hair come off ....

Peter Laursen
Webyog
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users