Trim String using a multi-character delimiter

Similar to this solution, I need to edit the value of a column, on several rows of a table, based on the presence of a string (not a single character delimiter) within the value of that column. Unlike the other solution, I am not trying to replace or add characters, nor am I trying to save data AFTER the string. In the corrupted data string:

good stuff in front'abc d' bad stuff I want to get rid of

I need a MySQL statement to find 'abc d' in the string, and then just return good stuff in front.



Read more here: https://stackoverflow.com/questions/68473612/trim-string-using-a-multi-character-delimiter

Content Attribution

This content was originally published by Robert West at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: