Hi,
I'm a little confused by the result of this query. At first I create two data sets with one common observation (value 2). Then I want to get this common observation from set a, but for some reason I get 3 as result. Can someone explain why is the code not working as I planned?
Hi,
May be this is what you are looking for.
proc sql;
select * from a where x in (select x from b);
quit;
It does look wrong, and so do the results from
proc sql;
select x, (select x from a intersect select x from b) as y from a;
select x, (select x from b intersect select x from a) as y from a;
quit;
You should submit a "Problem Report" to SAS (link at the bottom of the page) .
PG
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.