I am using ArcMap 10.8.2. I have two point layers from different sources which contain the educational facilities of Catalonia. Each layer may contain facilities that are not contained in the other layer. What I need to do is a single layer with all the information without duplicates.
First, I have run the 'Generate Near Table' using a Search Radius and limiting the number of near features reported for each input features to 3.
The output table featuring the field "Toponims" from one input layer, and the field "NOM" from the other input layer. These fields contain the names of the facilities.
In order to find duplicates I have used the tool 'Make Query Table' using the following SQL expression:
lower(Toponim) LIKE CONCAT(CONCAT('%',SUBSTRING(lower("NOM"),1,CHAR_LENGTH("NOM"))),'%')
It is a case-insensitive expression in order to find a greater number of duplicates, as sometimes facilities are not named exactly the same in both layers. This expression finds all features in which field "NOM" is entirely contained in field "Toponim", but there are some cases in which there is more text in field "NOM" than in field "Toponim" (e.g. 'Institut Escola Sant Esteve' vs 'Escola Sant Esteve'). When this happens, the expression does not find a duplicate.
Is there a way using the previous SQL expression to identify also these cases where text in field "NOM" is not entirely contained in field "Toponim"?