I have written a simple sub-query that pulls out the year from a datetime field in a MySQL DB. The WHERE clause checks that the year is >= 2009. The Query looks like:
WHERE YEAR(EndTime) >= '2009'
I have tried this in both MySQL Workbench and in SQL Server Management Studio (using a linked server). The result set contains results that are not valid given the where clause (malformed dates exist in the data set where the year is 5130, etc.).
Thanks in advance!