日期:2014-05-19  浏览次数:20448 次

在线等待,请高手批点!
select     sum(namount)-(@inta+@intb))   as   sscommisoin,   (@inta+@intb)   as   commisoin   ,sum(namount)   allnamount,invoice_no
    from   pcinvoicedetail   with(nolock)   where   invoice_no=@invoiceno   group   by   invoice_no

@inta=0   @intb=760,在运行时(@inta+@intb)   as   commisoin竟等于空,为什么会为空,之前写在存储过程还好好的。请高手指点,谢谢!

------解决方案--------------------
存储过程中给@inta赋值后加一句
select @inta = isnull(@inta,0)