MySQL Forums
Forum List  »  Quality Assurance

Problem deleting spaces
Posted by: Laurent Petr
Date: October 03, 2011 05:13AM

Hi,

I have a varchar field with multiple spaces and would like to update the table to replace each multiple spaces by a single space.

I have tried:

UPDATE myTable SET myField==REPLACE(trim(libelle), ' ','')

It works... but delete sometimes too much spaces!!
According the number of spaces, all spaces are sometimes removed! Even the single space that should stay...

How can I do? Is it possible in a single request?

Thanks
Laurent

Options: ReplyQuote


Subject
Views
Written By
Posted
Problem deleting spaces
2906
October 03, 2011 05:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.