CREATE PROCEDURE ReAlto @MM varchar(50), @YY varchar(50), @amt float output AS Declare @Alto float Declare @DE_Alto float if(select sum(intAltoAmt) from tblJoiningPayment where strMonth<= @MM and strYear<= @YY)=0 Begin set @Alto=0 End else Begin select @Alto= sum(intAltoAmt) from tblJoiningPayment where strMonth<= @MM and strYear<= @YY End
if(select sum(intPayAmount) from tblAltoPayment where strMonth<= @MM and strYear<= @YY)=0 Begin set @DE_Alto=0 End else Begin select @DE_Alto= sum(intPayAmount) from tblAltoPayment where strMonth<= @MM and strYear<= @YY End Begin Set @amt=( @Alto) - (@DE_Alto) End GO
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)