17 lines
276 B
MySQL
17 lines
276 B
MySQL
|
DELIMITER $$
|
||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `bi`.`nz`(vData DOUBLE)
|
||
|
RETURNS double
|
||
|
DETERMINISTIC
|
||
|
BEGIN
|
||
|
/**
|
||
|
* Devuelve 0, si el parámetro es NULL:
|
||
|
*/
|
||
|
DECLARE vResult DOUBLE;
|
||
|
|
||
|
SET vResult = IFNULL(vData,0);
|
||
|
|
||
|
RETURN vResult;
|
||
|
|
||
|
END$$
|
||
|
DELIMITER ;
|