Rule BP011 (A comparison or expression is using NULL without explicit provision for a NULL value.)
BrienKing
Posts: 30 Bronze 3
in SQL Prompt
This rule is not appropriate for a CASE statement.
CASE [s2].[SchoolID]
WHEN NULL THEN .[SchoolNumber]
ELSE [s2].[SchoolNumber]
END AS [SchoolNumber]
Unless what you're saying is that .SchoolNumber could also be NULL?
CASE [s2].[SchoolID]
WHEN NULL THEN .[SchoolNumber]
ELSE [s2].[SchoolNumber]
END AS [SchoolNumber]
Unless what you're saying is that .SchoolNumber could also be NULL?
Tagged:
Answers
Thanks for getting in touch.
I'm having trouble parsing that query as " .[SchoolNumber]" is missing its alias.
Would it be possible to paste the whole snippet?
Best,
Michael
Technical Lead, SQL Monitor