你用的事一个表,
  SELECT * FROM (select * from table) A LEFT JOIN (select * from table where year='2003') B  ON A.ID =B.ID 你试试开!

解决方案 »

  1.   

    select id,name,[year]=case [year] when '2003' then '2003' else null
    from [table]
      

  2.   

    --少写了endselect id,name,[year]=case [year] when '2003' then '2003' else null end
    from [table]
      

  3.   

    --测试--测试数据
    create table [table](id int,name varchar(10),[year] varchar(10))
    insert [table] select 1,'a',2003
    union  all     select 2,'b',2004
    union  all     select 3,'c',2003
    go--查询
    select id,name,[year]=case [year] when '2003' then '2003' else null end
    from [table]
    go--删除测试
    drop table [table]/*--测试结果id          name       year 
    ----------- ---------- ---- 
    1           a          2003
    2           b          NULL
    3           c          2003(所影响的行数为 3 行)
    --*/