query

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave @ home

    #1

    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


  • Bill Karwin

    #2
    Re: query

    Dave @ home wrote:[color=blue]
    > can anyone tell me a way to update the field to take out all the unwanted
    > spaces in one query.[/color]

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

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

    Regards,
    Bill K.

    Comment

    • Dave @ home

      #3
      Re: query



      thanks bill


      "Bill Karwin" <bill@karwin.co m> wrote in message
      news:e4ff7d02iv s@enews4.newsgu y.com...[color=blue]
      > Dave @ home wrote:[color=green]
      >> can anyone tell me a way to update the field to take out all the unwanted
      >> spaces in one query.[/color]
      >
      > UPDATE mytable SET mycolumn = REPLACE(mycolum n, ' ', '');
      >
      > See http://dev.mysql.com/doc/refman/5.0/...functions.html
      >
      > Regards,
      > Bill K.[/color]


      Comment

      Working...