Need update query--Remove the coma ","

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vssp
    Contributor
    • Jul 2006
    • 268

    Need update query--Remove the coma ","

    Hi friends

    Thanks for your repaly for all my question..
    I need one update query. I have selected the datas are insert with coma ",".

    Query
    SELECT city
    FROM `locations`
    WHERE city REGEXP ','

    I got the result..
    Silver Spring,
    Elkins,
    PORTLAND,
    Baltimore,

    I need like this
    Silver Spring
    Elkins
    PORTLAND
    Baltimore

    I need to remove the "," and restore the values .
  • ronverdonk
    Recognized Expert Specialist
    • Jul 2006
    • 4259

    #2
    How about this one?
    Code:
    SELECT replace(city, ",", "")
    FROM `locations` 
    WHERE city REGEXP ','
    Ronald :cool:

    Comment

    Working...