Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have problem in Data processing calculated Bill data to next year means forword only according to year.....Financial ID but message show Input string was not in a correct format.Could you give solution in your views......


SQL
ALTER PROCEDURE [dbo].[spGetMaxBillingFinancialYearID]      
 @FinancialYearID INT,      
 @WardNoID INT,
 @MohallaID INT,      
 @MaxBillingFinancialYearID INT OUTPUT      
AS       

BEGIN      

     IF EXISTS(SELECT MAX(FinancialYearID) FROM PropertyTaxBill WHERE WardNoID=@WardNoID AND MohallaID=@MohallaID AND FinancialYearID < @FinancialYearID)      
 
  BEGIN      
    SET @MaxBillingFinancialYearID=(SELECT MAX(FinancialYearID) FROM PropertyTaxBill WHERE WardNoID=@WardNoID AND MohallaID=@MohallaID AND FinancialYearID < @FinancialYearID)    
						 
  END      
     ELSE      
        BEGIN      
            SET @MaxBillingFinancialYearID=1      
        END      

END
Posted
Updated 19-Feb-13 22:29pm
v2
Comments
ssd_coolguy 20-Feb-13 5:58am    
please explain more... not sufficient information...
Sergey Alexandrovich Kryukov 20-Mar-13 9:29am    
Please stop posting non-answers as "solution". It can give you abuse reports which eventually may lead to cancellation of your CodeProject membership.
Comment on any posts, reply to available comments, or use "Improve question" (above).
Also, keep in mind that members only get notifications on the post sent in reply to there posts.
—SA

Hi ,

Try like this.....

SQL
ALTER PROCEDURE [dbo].[spGetMaxBillingFinancialYearID]      
 @FinancialYearID INT,      
 @WardNoID INT,
 @MohallaID INT,      
 @MaxBillingFinancialYearID INT OUTPUT      
AS       
 
BEGIN      
 
    SELECT @MaxBillingFinancialYearID=MAX(FinancialYearID) FROM PropertyTaxBill WHERE WardNoID=@WardNoID AND MohallaID=@MohallaID AND FinancialYearID < @FinancialYearID
    SELECT @MaxBillingFinancialYearID=ISNULL(@MaxBillingFinancialYearID,1)      

END


Regards,
GVPrabu
 
Share this answer
 
In your one of the post you said your SP executed successfully.
But why are you Posted your SP as a question...?
This error means, some convertion problem...
Once you send your code then we give exact solution..

If you want more information regarding this error then you go through this links..

http://stackoverflow.com/questions/8321514/input-string-was-not-in-a-correct-format[^]
http://stackoverflow.com/questions/2440339/input-string-was-not-in-a-correct-format-converting-string-to-double[^]


This might be helpfull to you if you want more information regarding this. Please send your source code...
 
Share this answer
 
v2
Pleae provide more information on above issue Are you getting error while executing procedure in .net?
 
Share this answer
 
Comments
Jibesh 21-Feb-13 2:26am    
do not post your comments/questions as solution. use reply link or Have a Question or Comment widget to post your comment. please delete this post.

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