select sum(namount)-(@[email protected])) as sscommisoin, (@[email protected]) as commisoin ,sum(namount) allnamount,invoice_no
from pcinvoicedetail with(nolock) where [email protected] group by invoice_no
@inta=0 @intb=760,在运行时(@[email protected]) as commisoin竟等于空,为什么会为空,之前写在存储过程还好好的。请高手指点,谢谢!
------解决方案--------------------
[email protected]
select @inta = isnull(@inta,0)