Re: functions problem
It should read
END IF;
not:
ENDIF;
PS are you aware of builtin functions IF(), IFNULL() and COALESCE() and the CASE expression?
your function CHG_NULL(a,b) is exactly equivalent to IFNULL(a,b) and to COALESCE(a,b) (SQL standard function); also equivalent to IF(a is null,b,a), also equivalent to
CASE WHEN a is null THEN b ELSE a END
see:
http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html
Edited 2 time(s). Last edit at 12/03/2005 06:47AM by Roland Bouman.
Subject
Views
Written By
Posted
2425
December 03, 2005 01:48AM
Re: functions problem
1458
December 03, 2005 06:43AM
1465
December 05, 2005 11:05AM
1485
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.