Replace

  • Hii Experts,

    I just want to know how to replace character ' from a column.The problem is that i want to write a select query in which i have to specify an insert statement in which i have already put ' mark before and after the column name ,the column contains articles and which have so many ' mark ..Please Help

    TIA

  • This script will remove single quotes, if that was what you were asking?

    UPDATE tablename

    SET col1 = REPLACE(col1, '''', '')

  • Thanks JWOL,

    The problem now is the column datatype is text and am getting error.

  • For text data types it's a bit more complicated. There's a good article on how to do it here: http://www.sqlteam.com/article/search-and-replace-in-a-text-column

  • Thanks Again 😀

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply