Hi Ballardw,
The code produce some undesirable combination within blackpair table and whitepair table.
For example, blackpair table has (b1 b1) , [(b1,b2) and (b2,b1)].
I think if we can eliminate these duplicate, the merge later step will do the work.
I try this code below but it only help to eliminate the (b1,b1) type of combination. I cant eliminate the other combination [(b1,b2) and (b2,b1)]
proc sql;
create table blackPaired as
select distinct a.*, b.black_name as b2_name, b.black_value as b2_value
from black as a left join black as b on a.black_name ^= b.black_name;
quit;
... View more