salix/db/routines/util/functions/accountShortToStandard.sql

9 lines
292 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`accountShortToStandard`(vAccount VARCHAR(10))
RETURNS varchar(10) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC
BEGIN
RETURN REPLACE(vAccount, '.', REPEAT('0', 11 - LENGTH(vAccount)));
END$$
DELIMITER ;