MySQL Forums
Forum List  »  Stored Procedures

functions problem
Posted by: d_hermanus
Date: December 03, 2005 01:48AM

Hi all,

I just can't seems to understand the mistake I've made with this function that I've
created. Please help

CREATE FUNCTION CHG_NULL (inDEC SMALLINT, outDec SMALLINT) RETURNS SMALLINT

BEGIN
IF inDEC = NULL THEN
RETURN outDEC;
ELSE
RETURN inDEC;
ENDIF;
END;

I've got this error msg.

MySQL said:

#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 'RETURN outDEC' at line 5

whats wrong?

Thanks,
Deddy

Options: ReplyQuote


Subject
Views
Written By
Posted
functions problem
2430
December 03, 2005 01:48AM
1462
December 03, 2005 06:43AM
1469
December 05, 2005 11:05AM
1488
December 05, 2005 10:24AM


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.