DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `util`.`formatRow`(vType CHAR(3), vValues VARCHAR(512)) RETURNS varchar(512) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci DETERMINISTIC BEGIN DECLARE vRow VARCHAR(512); IF vValues IS NOT NULL THEN SET vRow = CONCAT(' ', vType ,' ', REPLACE(vValues, ',', '') ,' '); ELSE SET vRow = ''; END IF; RETURN vRow; END$$ DELIMITER ;