MySQL Database Error: 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 'WHILE label1;
DROP FUNCTION IF EXISTS ExtractInteger; CREATE FUNCTION ExtractInteger ( _String VARCHAR(20) ) RETURNS INT BEGIN SET @Count = 0; SET @IntNumbers = ''; label1: WHILE (@Count <= LEN(_String)) DO IF (SUBSTRING(_String,@Count,1) >= '0' AND SUBSTRING(_String,@Count,1) <= '9') then begin SET @IntNumbers = @IntNumbers + SUBSTRING(_String,@Count,1); end; SET @Count = (@Count + 1); END WHILE label1; RETURN @IntNumbers; END;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)