I’m trying to exclude selected rows based on the first letter of a column. I.e All rows that columns ‘col’ do not starts with Y, A or B.
SELECT *
FROM tbl
WHERE col NOT LIKE 'Y%'
AND col NOT LIKE 'A%'
AND col NOT LIKE 'B%'
I’ve tried some variations such as using OR in place of AND or something like:
SELECT *
FROM tbl
WHERE col NOT IN ('Y%', 'A%', 'B%')
None of them give me the expected results,
THanks
Sorry, but I’ve found that I am using MS-Access SQL which differs from MySQL. The
%wildcard doesn’t work for MS AccessIt was just a mispelling issue. So the corrected version of this SQL is:
Best regards,