Answer the question
In order to leave comments, you need to log in
How to solve the problem with such request?
I have a field (one) where the search text is entered (first name, last name and patronymic), and there are three columns in the table, first name, last name, middle name.
When searching for the name Ivan, Ivans, Ivanovs, Ivanovichs will be displayed.
And when searching for Aleksey Ivanov, all Alekseys and all Ivanovs and Ivanovichs will be displayed, how to make it look only for those lines in which there are both values Aleksey and Ivanov. The difficulty is that we can get the search string Ivanovich Alexey, Alexey Ivanov, Ivanov Petrovich - i.e. the order may be different.
Answer the question
In order to leave comments, you need to log in
Found solutions myself (sample query):
select id,pr.name,pr.surname,pr.patronymic from proposals pr
where CONCAT_WS(' ', pr.name, pr.surname, pr.patronymic) LIKE '%Ив%Андре%'
Tear apart the request for words and independently determine by morphological features or a dictionary where the name is and where the patronymic is.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question