David Fetrow
David Fetrow

Reputation: 21

How do I replace a char with another char in a database field

So this finds the bullet. I want to replace it with '*'

SELECT * FROM tblTrkRecordAction WHERE CHARINDEX(CHAR(0x0095), Comment) > 0

Upvotes: 0

Views: 71

Answers (1)

Tim Biegeleisen
Tim Biegeleisen

Reputation: 521399

Assuming you want to make this replacement in the comments field you could try this:

SELECT
    REPLACE(Comment, CHAR(0x0095), '*') AS new_comment
FROM tblTrkRecordAction
WHERE
    CHARINDEX(CHAR(0x0095), Comment) > 0;

Upvotes: 1

Related Questions