Looking at the return value for year() on SQL Server and it seems to be an int.
Then why does the following statement return 'equal'?
Why does the comparison operator consider int 2002 and string '2002' equal? Should it?
select
case
when year('2002-01-14 00:00:00.000') = '2002' then 'equal'
else 'not equal'
end