I've got this case statement:
CASE
WHEN SecondScriptKind_ID IS NULL THEN 0
WHEN SecondScriptKind_ID IN (@SqlQuery, @SqlScript) THEN 1
ELSE 0
END
Is the WHEN SecondScriptKind_ID IS NULL
necessary in this case?
Both @SqlQuery and @SqlScript are guaranteed to contain values (NOT NULL).