TLP Posted December 8, 2008 Share Posted December 8, 2008 hello, I am trying execute this procedure but I keep getting a error, I think the error is the delimiter but for me its correct, how this can be fixed? DELIMITER || CREATE FUNCTION calculaMedia (m1 FLOAT(2,6),m2 FLOAT(2,6)) RETURNS FLOAT(2,6) BEGIN DECLARE media FLOAT(2,6); SET media = (m1+m2)/2; RETURN media; END|| Link to comment https://forums.phpfreaks.com/topic/136142-stores-procedures-help/ Share on other sites More sharing options...
fenway Posted December 9, 2008 Share Posted December 9, 2008 Shouldn't you be using: DELIMITER || CREATE FUNCTION calculaMedia (m1 FLOAT(2,6),m2 FLOAT(2,6)) RETURNS FLOAT(2,6) BEGIN DECLARE media FLOAT(2,6); SET media = (m1+m2)/2; RETURN media; END; || DELIMITER ; Link to comment https://forums.phpfreaks.com/topic/136142-stores-procedures-help/#findComment-710566 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.