7 Replies Latest reply on Sep 9, 2008 9:53 AM by Newsgroup_User

    replace () not working

    Level 1
      I have the simple code

      UPDATE blog_comments
      SET comment=replace(comment,'#phrase#','*****')

      Where #phrase# is a specific word.

      The results are not working like I thought.

      If #phrase# were 'drink'

      it replaces the word drinking with *****ing. I don't want it to replace the first part of a word and it is doing that. I only want it to replace the exact word drink with *****.

      It also does the the same with the word drinks. It give me *****s.

      How can I have it only replace the exact string without seeing a portion of a word?