locked
hard code values not getting printed in sql RRS feed

  • Question

  • User-1506965535 posted

    I want to know the value of @NoOfDaysForDelayApproval in a print, but it is not displaying it. I dont know why

     declare @NoOfDaysForDelayApproval int
    						BEGIN
    							select @NoOfDaysForDelayApproval = sum(Total_Days) 
    								from XXACL_EMP_DELAY_APPROVAL_V    
    								where cardno=@EmpCardNo
    								and DMonth= @Month
    								and DYear = @Year
    								
    								print 'delayed :- ' + convert(varchar(50),@NoOfDaysForDelayApproval) 
    								
    						END

    Even "delayed :-" is also not coming in PRINT

    Wednesday, December 23, 2015 11:58 AM

Answers

  • User77042963 posted
     declare @NoOfDaysForDelayApproval int
    						BEGIN
    							select @NoOfDaysForDelayApproval = ISNULL(sum(Total_Days) ,-1)
    								from XXACL_EMP_DELAY_APPROVAL_V    
    								where cardno=@EmpCardNo
    								and DMonth= @Month
    								and DYear = @Year
    								
    								print 'delayed :- ' + convert(varchar(50),@NoOfDaysForDelayApproval) 
    								
    						END
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 23, 2015 2:26 PM