Identify all duplicates irrespective of the order of the input

OpenSQL

Indeed your problem is weird as the order is not fixed otherwise it was a straightforward requirement.

In order to get your task done, you need to search in all names individually and to be sure that you don’t get the entries which are super set of your search, you need to place a length check as well.

For e.g.: if there exists a entry with ‘Johnny Rambo’, it should not be returned as it contains John as well as Rambo. I hope you got my point

You can place a filter like ('%' + name1 + '%') AND field = ('%' + name2 + '%') AND field = ('%' + name3 + '%') AND LENGTH(field) = LENGTH(name1 + name2 + name2)

raja
Published on 21-Dec-2017 10:55:14
Advertisements