While handling not in sub-query with null in the sub-query we need to eliminate NULLS to get your expected results
create table #outertable (i int)
create table #innertable (i int)
insert into #outertable (i) values (1), (2),(3),(4), (5)
insert into #innertable (i) values (2), (3), (null)
s...