MySQL Forums
Forum List  »  Stored Procedures

cant' create stored procedure
Posted by: 123 1313
Date: April 16, 2014 08:47PM

I have a stored procedure was accident dropped but can't create again in MySQL Query Browser.

Below is my stored procedure

DELIMITER $$

DROP PROCEDURE IF EXISTS `eaglebilldb`.`(e)setReportCollected` $$
CREATE DEFINER=`root`@`%` PROCEDURE `(e)setReportCollected`()
BEGIN
UPDATE
`(e)individualreport`
SET
`isCollection`='1'
WHERE
`InvoiceNumber`
IN
(SELECT `InvoiceNumber` FROM `invoice` WHERE `Collected` = '1' AND (`InvoiceNumber` LIKE '%I-13%' OR `InvoiceNumber` LIKE '%I-12%'));
END $$

DELIMITER ;

If execute above procedure, the error message is appear that you have an error in your SQL syntax in line 4(CREATE DEFINER=`root`@`%` PROCEDURE `(e)setReportCollected`()), error no. 1064

I saw the one forum mentioned that if run in tools and it will appear an error, but run in command line is o.k. Anyone can teach me step by step to fix this problem because I am a novice.

Options: ReplyQuote


Subject
Views
Written By
Posted
cant' create stored procedure
1741
April 16, 2014 08:47PM
864
April 16, 2014 10:37PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.