MySQL Forums
Forum List  »  Stored Procedures

How to replace in syntax when calling stored procedure?
Posted by: Clement Yap
Date: August 15, 2012 02:28AM

Hi I am not sure how to replace values in the syntax when calling the stored procedure. Please advise. Please see my codes.

Here's my created stored procedure:-

DELIMITER $$

DROP PROCEDURE IF EXISTS `dbprodigy`.`numOfTests` $$
CREATE PROCEDURE `dbprodigy`.`numOfTests` (IN yr varchar(255), IN mth varchar(255))
BEGIN
select count(distinct SN) from tester where Date > yr"-"mth"-01 00:00:00" and Date < yr"-"mth"-31 24:00:00";
END $$

DELIMITER ;

Here's my call:-

call numOfTests("2012","03");

My call returns nothing.
Clement

Options: ReplyQuote


Subject
Views
Written By
Posted
How to replace in syntax when calling stored procedure?
2117
August 15, 2012 02:28AM


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.