I want to exclude data if the last 3 characters is "abc, but only if the fourth char is not "." (dot).
For example, "sdgabc" is excluded, but "sdg.abc" is included.
How can I achieve this?
RIGHT(column_name, 3) <> "abc"
doesn't work because "sdg.abc" also filtered out.
CodePudding user response:
We can use a combination of LIKE
here:
SELECT *
FROM yourTable
WHERE column_name NOT LIKE '