Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

i have a VARCHAR field that contains numbers which have spaces. example 4444
5555 6666

can anyone tell me a way to update the field to take out all the unwanted
spaces in one query.

until now i have been editing each record one by one


Re: query

Dave @ home wrote:
Quoted text here. Click to load it

UPDATE mytable SET mycolumn = REPLACE(mycolumn, ' ', '');

See http://dev.mysql.com/doc/refman/5.0/en/string-functions.html

Bill K.

Re: query

thanks bill

Quoted text here. Click to load it

Site Timeline