salix/db/routines/edi/functions/imageName.sql

23 lines
618 B
MySQL
Raw Permalink Normal View History

DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `edi`.`imageName`(vPictureReference VARCHAR(255))
RETURNS varchar(255) CHARSET utf8mb3 COLLATE utf8mb3_unicode_ci
DETERMINISTIC
BEGIN
SET vPictureReference = REPLACE(vPictureReference,'.','');
SET vPictureReference = REPLACE(vPictureReference,'/','');
SET vPictureReference = REPLACE(vPictureReference,'%','');
SET vPictureReference = REPLACE(vPictureReference,':','');
SET vPictureReference = REPLACE(vPictureReference,'?','');
SET vPictureReference = REPLACE(vPictureReference,'=','');
RETURN vPictureReference;
END$$
DELIMITER ;