With the given data contained in a text (csv) table:
id,last_name,first_name,middle_name,gender
1114920261,THACKER,RICHARD,RANDALL,M
And trying the following query:
SELECT * FROM "provider" p
WHERE UPPER('Thacker') LIKE CONCAT('%', "last_name", '%')
AND UPPER('Richard') LIKE CONCAT('%', "first_name", '%')
I get the expected result returned, but trying the following very similar query:
SELECT * FROM "provider" p
WHERE UPPER('Thacker') LIKE CONCAT('%', "last_name", '%')
AND UPPER('R') LIKE CONCAT('%', "first_name", '%')
...it returns nothing. The '%' wildcards surrounding the column name should allow for searching by any sequence of characters that are contained within the given name, but it appears to be functioning as an exact match only.
Ugh nevermind....just realized I had the like reversed. Feel free to close!
Last edit: hardwickj 2022-06-08
In case people wonder what was intended, it is usually something like