How to remove all spaces between a column field?. The spaces occur in the middle of the text so trim won't work and also replace is not working. my code is
      UPDATE  temp_emp t1,  master_employee t2
      SET t1.lm= t2.emp_id
      where REPLACE(t1.lm, ' ', '') = REPLACE(CONCAT(t2.first_name,'',t2.last_name), ' ', '');
for example when i run the query ,
       select REPLACE(lm, ' ', '') AS concat from temp_emp1
i get the output as follows
         concat
         ----------------------------------------
         rick joe
         james cole
         albert Th
i want the output to be ;like this
          concat
         ----------------------------------------
         rickjoe
         jamescole
         albertTh
 
     
    