1

I got a value like "opening 01-01-2001" in a field, i want to remove all values like that, getting a result like "opening ".

Actually i'm using this code to replace words:

UPDATE table
SET field = REPLACE(field, 'word', '');

Is there something like wildcards? I.E.:

UPDATE table
SET field = REPLACE(field, '%*-*-*%', '');

To remove all entire word using only the starting character or the word mask?

Ullas
  • 11,450
  • 4
  • 33
  • 50
mkainz
  • 15
  • 4
  • No, in MySQL there is no built-in function that could replace a portion of a string based on a pattern. – Shadow Oct 07 '16 at 13:52
  • Do all of your "problem" fields have the word `'opening'` in them? Or are you looking for a more general solution that you can apply in other situations? – CLAbeel Oct 07 '16 at 14:31

0 Answers0