SELECT CONCAT (
schoolname
,CASE
WHEN schoolcity IS NULL
OR schoolcity = ''
THEN ''
ELSE (', ' + REPLACE(schoolcity, 'ã', 'a'))
END
,CASE
WHEN schoolname IS NULL
OR schoolstate = ''
THEN ''
ELSE (', ' + schoolstate)
END
) AS schoolname
FROM schools
WHERE schoolname LIKE '"+filter+"%'
ORDER BY schoolname
This particular query is causing some unexpected behavior during execution. It seems like when an apostrophe is added in the filter from the search bar, the desired results are not being displayed.
For example: Trying to search for "Types children'" and nothing appears
The expected outcome should be to display school names containing "children's". Can anyone provide assistance with this issue?