I have an MYSQL 8 table in which the full name of the same person (LN FN MI) is listed two different ways (two different records). Record#1 is MCCAULEY KELLY JO and Record#2 is MC CAULEY KELLY JO. There should be no space between MC and CAULEY. This occurs for hundreds of names that begin with ‘MC’ or other combos like ‘MR’. What is the best way to delete the records with the space? enter image description here
At first, I tried the REPLACE COMMAND. If I wanted to replace all of the spaces, it would work but I don’t want to replace all of them. If that would have worked I would have deleted the duplicate record.
2
Answers
You could try something like this using the wildcard symbol in SQL (%):
Using regular expression might also be helpful: