for example...
ALTER PROCEDURE [dbo].[Reports_Dashboard_Get_Sav]
-- Add the parameters for the stored procedure here
@startDate datetime,
@endDate datetime,
@companyID int=null
set @days=datediff(m,@startdate,@enddate)
if (@days)=0
set @days=1
This is not my code but if this is case sensitive then @days is not going to be calculated properly as the startDate/startdate and endDate/enddate variables don't match...