Hi all,
I am getting a weired output while using the 'except all' command. I have (A join B) as source and C as target.
(A join B) has same number of records as in C
if I do a 'except all' between C and (A join B) I get no records
but when I do 'except all' between (A join B) and C I get 37 records. And these records are actually not seen in (A join B).
Can anybody take me out of this problem?
Might help to actually post the code involved.
here is the code-
rsubmit;
proc sql;
create table TEST_RESULT as
select B.OFFRG_N,
B.OFFRG_TS,
A.AG_PER_POL_L
from MPTST031_UWS_POL A, CSTST061_UWS_CB_CV B
where A.POL_N = B.POL_N
except
select OFFRG_N,
OFFRG_TM_CRT_TS,
AG_PER_POL_L
from CCTRP121_CSIX;
select count(*) from TEST_RESULT;
quit;
hey guys, today I am not getting that unexpected output. I have no idea why this happened. But anyways thanks and sorry if you put your time on this.
Don't know what was expected, but the EXCEPT operator is not commutative.
Maybe you should uniform these variables name . These two set of variables should be the same name .
Just Guest.
Xia Keshan
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.