解决方案 »

  1.   

      DECLARE @Dt DATE=GETDATE()+1
      where ( a.fifinitial<>'1'  and  d.fstktype='2') and ((a.factindate>=DATEADD(dd,-3,@Dt) and a.factindate<@Dt )) and  a.fifcancel ='0'  and  ( a.fifinitial<>'1'  and  d.fstktype='2' )
      

  2.   

    where ( a.fifinitial<>'1'  and  d.fstktype='2') and
     ((a.factindate>=CONVERT(VARCHAR(10),DATEADD(DAY,-2,GETDATE()),120)
     and a.factindate<GETDATE() )) 
    and  a.fifcancel ='0'  and  ( a.fifinitial<>'1'  and  d.fstktype='2' )含今天的三天的写法
      

  3.   

    在语句前加上
    SQL2008:
      DECLARE @Dt DATE=GETDATE()+1select * from where .....SQL2005/2000
      DECLARE @Dt DATETIME
    SET @dt=CONVERT(VARCHAR(10),GETDATE()+1,120)
      

  4.   

    你这个跟我那个一样吗?
    你改了也不改对
    括号数不对,你数下,把多的去掉即可OK TKS
      

  5.   

    在语句前加上
    SQL2008:
      DECLARE @Dt DATE=GETDATE()+1select * from where .....SQL2005/2000
      DECLARE @Dt DATETIME
    SET @dt=CONVERT(VARCHAR(10),GETDATE()+1,120)
    OK ,TKS