Help understand why erroneous inner query does not make outer query erroneous
The following query returns 19
proc sql;
select count(distinct name)
from sashelp.class
where name in (select name from sashelp.iris
where species is not missing)
;quit; *returns 19;
However, I would expect it to return an error, because the inner query does indeed return an error (because the column 'name' is not found in sashelp.iris):
proc sql;
select name from sashelp.iris
where species is not missing
;quit; *returns an error (column not found);
Can some explain the logic why I am not getting an error message in the first instance?