Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have written the store procedure.
Execute the code in Query Analyzer

Declare @amt float
exec ReAlto '3','2010' @amt output
Select @amt


The Above code how can execute in VB.Net
Plz send the code.

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



Thanks
Mahendra Kumar Das
Posted
Updated 10-Dec-10 0:12am
v2
Comments
senguptaamlan 10-Dec-10 7:43am    
why don't you make a google search ????

1 solution

Take a look at Here[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900