Home How do I replace a char with another char in a database field
Reply: 1

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

David Fetrow
1#
David Fetrow Published in 2017-11-13 16:56:58Z

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

SELECT * FROM tblTrkRecordAction WHERE CHARINDEX(CHAR(0x0095), Comment) > 0
Tim Biegeleisen
2#
Tim Biegeleisen Reply to 2017-11-13 17:00:50Z

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;
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.30538 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO