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
dave [ Mi, 17 Mai 2006 15:19 ] [ ID #1318166 ]

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.
Bill Karwin [ Mi, 17 Mai 2006 17:24 ] [ ID #1318168 ]

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.
dave [ Mi, 17 Mai 2006 21:29 ] [ ID #1318169 ]
Datenbanken » mailing.database.mysql » query

Vorheriges Thema: MySql installation on Solaris10 problem
Nächstes Thema: trigger/stored procedure error