query
hello,
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
thanks
Re: query
Dave [at] home wrote:
> can anyone tell me a way to update the field to take out all the unwanted
> spaces in one query.
UPDATE mytable SET mycolumn = REPLACE(mycolumn, ' ', '');
See http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
Regards,
Bill K.
Re: query
thanks bill
"Bill Karwin" <bill [at] karwin.com> wrote in message
news:e4ff7d02ivs [at] enews4.newsguy.com...
> Dave [at] home wrote:
>> can anyone tell me a way to update the field to take out all the unwanted
>> spaces in one query.
>
> UPDATE mytable SET mycolumn = REPLACE(mycolumn, ' ', '');
>
> See http://dev.mysql.com/doc/refman/5.0/en/string-functions.html
>
> Regards,
> Bill K.