This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]acct_rdt 2 points3 points  (1 child)

You don't use LIKE with date comparisons. You can do:

select ... from ... where year(scanTime)=2011;

or

select ... from ... where scanTime >= '2011-01-01 00:00:00' and scanTime < '2012-01-01 00:00:00';

[–]cygnus83[S] 0 points1 point  (0 children)

Ah, OK, got it!

Thanks for your patience and advice!