I am trying to check one column substring is in another columns
table1
FullName
Johns Doue
Johnny
Betty Smith, Chair
table2
Name
John
using table2 to see if it is a substring of table1. it should return Johns Doue and Johnny.
SELECT * FROM table1.FullName AS table1
JOIN table2.Name AS table2
WHERE table2.Name LIKE SUBSTRING(table1.FullName, 0, 10);
this is returning null's being compared. im not sure what i am doing wrong. From my logic, it seems like its taking the results from table2.name and comparing to the substrings of table1.FullName.