The IN predicate and quantified comparison predicates behave incorrectly with NULL. According to SQL:2016-2, the result of `null in (non-empty list or query)`, `null = any (non-empty query)`, `null = ...
Provide the output of executing SELECT @@Version on your target SQL Server. Microsoft SQL Server 2022 (RTM-GDR) (KB5058712) - 16.0.1140.6 (X64) Jun 19 2025 11:40:25 ...
Well, if you happen to be using Sql Server you can do that sort of thing in T-Sql. In Oracle, you can also accomplish the same thing using pl/sql. Either way i'd do it in a stored ...