May 31, 2017 09:53 AM|jeff.wenchai|LINK
The StoredProcedure is as follows-I want to sum from TableA into TableB
update TableB set amount=A.AMOUNT
from (select sum(IsNull(amount,0)) as amount from TableA where no=@no) A
It can work fine.But if the TableA is empty,the StoredProcedure can't work. so,how to fix that. Thanks.