MySQL Hide Specific Characters from Query

I'm trying to run a query that returns a VARCHAR field that may or may not contain the characters ***. If it does contain that, I basically want to hide the 3 characters and display the rest of the string. I was trying to get the syntax below to work, but for some reason it doesn't. Any help please? Thanks!


SELECT Field1 = REPLACE(Field1,'***','') AS Test FROM `tbl_Data` WHERE ID=33

Open in new window

brendan-amexAsked:
Who is Participating?
 
dirknibleckCommented:
Is this specific query the issue, because if it is, the "Field1 =" part is probably your problem. Try:
SELECT REPLACE(Field1,'***','') AS Test FROM `tbl_Data` WHERE ID=33

Open in new window

0
 
brendan-amexAuthor Commented:
Oops, yep. That was it. Easy 500 points. Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.