I have a complex scenario for string matching and want input from you guys.
I have a table Named Customers. This table contains a field CustomerName varchar.
Data in the column is prefixed with Mr. Mrs. Ms.
Data could be
- Mr. John Brady
- Ms. Abraham Lenin
- Mrs. John Brady
- Mr. Michael King
- Mrs. Neil Thomas
- Mrs. Micheal King
Now I need to design a search query that returns me rows of only Couples and in a sequenced manner.
Like Select CustomerName from Customer where …??
Result needs to be like
- Mr. John Brady
- Mrs. John Brady
- Mr. Michael King
- Mrs. Micheal King
Any Idea ?
Thanks in advance for the consideration.
1 Answer