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...
They can be, depending on your database's collation. When you install SQL Server and choose your default collation, you'll notice that there's a "case sensitivity" checkbox. Certain collations are case sensitive and will affect your queries (and stored procedures).
Worse still, many vendors don't test their products on servers with case sensitive collations, which leads to runtime errors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With