If (@MaxSecondPerMonth>0 )这句前边有中文空格。删除

解决方案 »

  1.   

    -----------去掉它后面的空格!
    Select @act_amt=isnull((Select sum(amount) from mod_fee_result Where (startTime between @Date_S and @Date_E) and userNO=@userNO and userID=@ANI and substring(callNO,1,len(@areaNO))=@areaNO and substring(createID,1,2)='50' Group by userNO,userID,substring(callNO,1,len(@areaNO))),0.00)
      

  2.   

    确实是这句有问题,也就是上面老兄说的有中文空格
    --
      If (@MaxSecondPerMonth>0 )--修改一下,去掉空格就好了
    If(@MaxSecondPerMonth>0)