this Is the query for example:
DELIMITER //
CREATE FUNCTION CreateField ( length INT, content varchar(500))
RETURNS VARCHAR(500)
BEGIN
RETURN SUBSTRING(CONCAT(COALESCE(NULLIF(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(IFNULL(content, ''), 'ä', 'ae'), 'ö', 'oe'), 'ü', 'ue'), 'Ä', 'Ae'), 'Ö', 'Oe'), 'Ü', 'Ue'), ''), '$'), SPACE(length)),1,length);
END //
DELIMITER ;
--> error as stated above.