6
I am developing code to search for people names intelligently using SQL SERVER LIKE operator.
In names like Souza and Sousa just use brackets [] Ex.:
select * from pessoas where nome like 'joão sou[sz]a%';
The above example returns me:
id | nome
-----------------
10 | joão souza araujo
56 | joão sousa dos santos
In the case of the example of souza|souza it was only to replace the letter, but in Vitor|Victor in which the letter C is optional I could not get information on how to assemble the query. This is my doubt.
Possible duplicate of How to make a phonetic algorithm for Brazilian Portuguese?
– Sorack
In Oracle I use UTL_MATCH EDIT_DISTANCE and JARO_WINKLER for sql server a quick search returned https://stackoverflow.com/questions/33882620/jaro-winkler-in-sql-server
– Motta
@Sorack didn’t know the phonetic algorithm. I’m going to look it up
– Ennio Sousa
Has an answer that has the algorithm for the
MySQL
. I have somewhere the same example forSQL Server
, but I have to look...– Sorack