15 lines
297 B
MySQL
15 lines
297 B
MySQL
|
DELIMITER $$
|
||
|
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn2008`.`red`(intCANTIDAD DOUBLE)
|
||
|
RETURNS double
|
||
|
DETERMINISTIC
|
||
|
BEGIN
|
||
|
|
||
|
DECLARE n DOUBLE;
|
||
|
|
||
|
SET n = SIGN(intCANTIDAD) * TRUNCATE( (ABS(intCANTIDAD) * 100) + 0.5001 ,0) /100 ;
|
||
|
|
||
|
RETURN n;
|
||
|
|
||
|
END$$
|
||
|
DELIMITER ;
|