in sql query while doing datediff I want to take into consideration null values too
this is what i have
SUM(CASE WHEN DATEDIFF(day, LoadDate, StartDate) BETWEEN 0 AND 2
THEN 1 ELSE 0 END) AS 'Testfield'
In the above scenario start date can either be some date or null. If its null I want to make it today's date. can we do that.