Code: Select all
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DELIMITER' at line 1
[Err] CREATE PROCEDURE `update_zoneip`(IN v_ip VARCHAR(15))
BEGIN
UPDATE zone_settings
SET zoneip = (
SELECT z.a + (z.b * 256) + z.c * power(256, 2) + z.d * power(256, 3)
FROM (
SELECT substring_index(substring_index(y.ip, '.', 1), '.', -1) a,
substring_index(substring_index(y.ip, '.', 2), '.', -1) b,
substring_index(substring_index(y.ip, '.', 3), '.', -1) c,
substring_index(substring_index(y.ip, '.', 4), '.', -1) d
FROM (
SELECT v_ip AS ip
) y
) z
);
END ;
DELIMITER ;
[Msg] Finished - Unsuccessfully
--------------------------------------------------
However, in Navicat it doesn't function; when you try to run it you get another error:
Code: Select all
Procedure execution failed
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.55.24)' at line 1
Is this particular feature / file not compatible with Navicat?