select @x = sum(amount) from table1
set @z=0 set @x = select sum(isnull(amount,0)) from table1 set @y = select sum(isnull(amount,0)) from table2 set @z=@y-@x id @z<0 begin "Failed Result" end else begin "Success Result" end
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)