proc sql;
select *
from certadv.col1 except
select *
from certadv.col2;
quit;
proc sql;
select *
from certadv.col1 except
select *
from certadv.col2;
quit;
proc sql;
select *
from certadv.col1 except
select *
from certadv.col2;
quit;
proc sql;
select *
from certadv.col1 except all
select *
from certadv.col2;
quit;
proc sql;
select *
from certadv.col1 except corr
select *
from certadv.col2;
quit;
proc sql; select * from certadv.col1 except all corr select * from certadv.col2; quit;
1
,
but table Col2 contains only one row in which the value of X is 1
.
That one row in table Col2 causes the first of the three rows in table
Col1 that have a matching value of X to be eliminated from the output.
However, table Col2 does not have two additional rows in which the
value of X is 1
. Therefore, the other
two rows in table Col1 are not eliminated, and do appear in the output.
Table
|
Relevant Columns
|
---|---|
Certadv.Staffchanges
lists information for all new employees and existing employees who
have had a change in salary or job code.
|
FirstName, LastName |
Certadv.Staffmaster
lists information for all existing employees.
|
FirstName, LastName |
proc sql;
select firstname, lastname
from certadv.staffchanges except all
select firstname, lastname
from certadv.staffmaster;
quit;