Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Location
    Canada
    Posts
    57

    Unanswered: REPLACE doesn't accept < or > in string...

    I wrote:
    Code:
    UPDATE `table_name` SET column_name = REPLACE(column_name,  - , <br />) WHERE column_name LIKE '% - %'
    I tried to escape < and > with an \ but I get error messages...
    What's wrong?

    Thanks for any help.

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    REPLACE(column_name, ' - ', '<br />')
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Apr 2004
    Location
    Canada
    Posts
    57
    FANTASTIC !!!
    It works at the first attempt!
    Thousands of thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •