title: Remove Spaces between between characters and numbers in a string
body: <p>I am trying to remove spaces between characters and numbers in a string 
  For example if I have "Value 01", I want "Value01" back . So I wrote a function, but it is giving me error Unexpected ), Also I am not sure if this is the most efficient way to do it. I tried searching for Regex Replace but couldn't find anything as such</p>
  
  <pre><code>CREATE DEFINER=`root`@`localhost` FUNCTION `RemoveSpaces`(
     myWord VARCHAR(1000)
  ) RETURNS VARCHAR(1000)
  
  BEGIN
  DECLARE RETURNSTRING VARCHAR(1000);
  
  SET RETURNSTRING = (
  SELECT 
     LEAST (
     if (Locate('0',myWord) &gt;0, 
        REPLACE(myWord, ' 0', '0'),
     if (Locate('1',myWord) &gt;0,
        REPLACE(myWord, ' 1', '1'),
     if (Locate('2',myWord) &gt;0,
        REPLACE(myWord, ' 2', '2'),
     if (Locate('3',myWord) &gt;0,
        REPLACE(myWord, ' 3', '3'),
     if (Locate('4',myWord) &gt;0,
        REPLACE(myWord, ' 4', '4'),
     if (Locate('5',myWord) &gt;0,
        REPLACE(myWord, ' 5', '5'),
     if (Locate('6',myWord) &gt;0,
        REPLACE(myWord, ' 6', '6'),
     if (Locate('7',myWord) &gt;0,
        REPLACE(myWord, ' 7', '7'),
     if (Locate('8',myWord) &gt;0,
        REPLACE(myWord, ' 8', '8'),
     if (Locate('9',myWord) &gt;0,
        REPLACE(myWord, ' 9', '9')
     )
   )
  );
  RETURN RETURNSTRING;
  END
  </code></pre>