Forum Discussion
togethere
Nov 19, 2024Copper Contributor
SQL Server 2022 DateDiff D not working
Just updated an SQL server 2017 instance to 2022 and a very simple where clause using DataDiff(d) no longer works in a stored procedure. Here is the where clause: ...AND datediff(d, A.Custfirstvisi...
rodgerkong
Nov 20, 2024Iron Contributor
Any weired result must be caused by unusual condition. The issue you descripted might be caused by different server or db configurations, unexpect data in table, other compatibility issues in context of the stored procedure. But not caused by datediff(d) and comparison operator.
If you really want to resolve the problem, try to provide more information instead of complaining.