select * from table1 where  l_char between convert(char(10),getdate(),126) and convert(char(10),getdate()+7,126)

解决方案 »

  1.   

    TRY:
    select * from table
    where  convert(char(5),getdate(),120)+right(生日,5) between convert(char(10),getdate(),120) and convert(char(10),getdate()+7,120)
      

  2.   

    select [name] from table1 where datediff(wk,getdate(),cast(replace(生日 ,left(生日 ,4),cast(year(getdate()) as varchar(10))) as datetime))=1 or datediff(wk,getdate(),cast(replace(生日 ,left(生日 ,4),cast(year(getdate()) as varchar(10))) as datetime))=0
      

  3.   

    select * from table1 where  datediff(day,getdate(),l_char) between 0 and 7