I have multiple tables with different customer names. I am trying to find out how many times the same name is in a table. The challenge here is that someone could have entered the name as "John Smith" or "Smith, John".
There are 40,000 rows in each table and over 40 different tables. I am trying to query somehow without knowing the names but still return like names.
Basically I need to group like names without using a statement like where cust_name like '%john%'
.
How can you query multiple table columns using the contents of other table columns when the data within may not be in the same format? How would you best 'clean' the data to remove commas, spaces, etc?