I have this query on a MySQL table
SELECT * from cvisitor where SUBSTRING(last_time,1,10) >= '2016-01-27' and SUBSTRING(last_time,1,10) <= '2016-01-28' and email not like '%@lakos.com' order by last_time
There are a number of rows where the email IS like @lakos.com. They are not excluded.
If I do the following, it works.
SELECT * from cvisitor where email not like '%@lakos.com'
Why does not the first work? Do I need parens around date comparisons?
Thanks
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.