LEFT JOIN schools ON (bt.MidSchool LIKE schools.Name OR **%schools.Name% LIKE bt.ElmSchool**) WHERE ...
This is the portion of my SELECT that I have problems with.
I would like to find if the string in column schools.Name
exist in column bt.ElmSchool
When I add % before and after the column name %schools.Name%
I get a syntax error. if I use '%schools.Name%' the query is perform but it's looking for the column name instead of its value. I have tried escaping but didnt work. any idea??