I have encountered a script like this:
set @sum = sum = (case when somecol1 is null then DATEDIFF(d,[somecol2],somecol3) else 0 end)
I can't understand the meaning of the equal sign (=) after the second keyword sum. When I run the query it is not showing any errors both with the equal sign and without.
I want to know the purpose of putting an equal sign after the keyword sum
. Is that a mistake or not?
Thanks