Hello! I am a newbie in SAS, but faced with unexpected behavior of intersection/except nested in select Consider 2 datasets m and n data m;
input x$ @@;
cards;
a b e
;
run;
data n;
input x$ @@;
cards;
a d e
;
run; The following query with IN gives the expected result 'd' proc sql; SELECT * FROM n WHERE x IN (SELECT * FROM n EXCEPT SELECT * FROM m); Unlike the query with EQUAL instead of IN, which returns 'e' proc sql;
SELECT * FROM n
WHERE x EQUAL (SELECT * FROM n
EXCEPT
SELECT * FROM m); Can anybody explain such strange behavior? I would really appreciate your help. I can give more examples, in case they are needed.
... View more