PDA

View Full Version : Stored Procedure


mic2100
02-15-2006, 03:07 PM
This is some code that i have taken from a website and tried to fit around a task that i wanted it to do.

STORED PROCEDURE:---
DELIMITER $$


DROP FUNCTION IF EXISTS sjmsurveys.InsulationTeams $$
CREATE FUNCTION sjmsurveys.InsulationTeams () RETURNS INT
BEGIN
DECLARE param1 INT;

SELECT COUNT(ReferralNum) INTO param1 FROM sjmsurveys.referrals;

RETURN param1;

END $$

DELIMITER ;

I always get an error message

Line 5 Table mysql.proc doesn't exist

does any1 know wot this may be???

raf
02-15-2006, 10:48 PM
http://lists.mysql.com/mysql/166489

gregdaner
05-10-2006, 02:11 PM
Typically, when you upgrade your MySQL server from version 4.X to 5.X, you need to issue commands before you can use these new features.

See: http://dev.mysql.com/doc/refman/5.0/en/mysql-upgrade.html