Erro SQL (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 10
The generated code is the following:
CREATE DEFINER=`root`@`localhost` FUNCTION `CONVERTE_VALOR`(`VALOR` VARCHAR(255))
RETURNS decimal(10,0)
LANGUAGE SQL
NOT DETERMINISTIC
NO SQL
SQL SECURITY DEFINER
COMMENT 'Converte valor VARCHAR em DECIMAL para comparação'
BEGIN
RETURN CAST(REPLACE(REPLACE(VALOR, '.', ''), ',', '.') AS UNSIGNED); /* Line 10 */
END
Any suggestions?