SELECT * from pvm_1 where CONVERT(varchar(10),arrival,120) like '%2003%' order by arrival desc 
你为什么非要like呢??select year(getdate()) --年
select month(getdate()) --月
select day(getdate()) --日--查当月:
select * from pvm_1 where datediff(month,arrival,getdate())=0
--当天:
select * from pvm_1 where datediff(day,arrival,getdate())=0--年
select * from pvm_1 where year(arrival)=2003这么多方法

解决方案 »

  1.   

    SELECT * from pvm_1 where convert(char(4),arrival,120) = '2003' order by arrival desc 
      

  2.   

    也可如下:
    datepart(year,arrival) = 2003
      

  3.   

    select * from pvm_1 where year(arrival)=2003
      

  4.   

    SELECT * from pvm_1 where CONVERT(varchar(10),arrival,120) like '%2003-02%' order by arrival desc 以上我测试过,但我没说清楚不是只查年
      

  5.   

    SELECT * from pvm_1 where CONVERT(varchar(10),arrival,120) like '2003-02%' order by arrival desc