cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
Lavik17
Level II

Is there a "true" outer-join in JMP?

I am looking for a true outer-join that will return only the mis-matches between the tables based on the match column.

The dialogue allows for including non-matches to the inner match, but there's no option to just search for the non-matches and exclude the inner-match.

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Is there a "true" outer-join in JMP?

Is this the situation you are looking for?

jthi_2-1674250826473.png

You could enable Match Flag, perform full outer join and remove rows which have Match Flags "Both".

jthi_0-1674250557239.png

jthi_1-1674250563731.png

-Jarmo

View solution in original post

4 REPLIES 4

Re: Is there a "true" outer-join in JMP?

I'm not aware of a direct way, but an indirect way is to choose the "Match Flag" option when creating the join, then you can manually/programmatically delete any rows that have the label "Both" in the "Match Flag" column. I've put a script below that does this as an example. 

Jed_Campbell_0-1674250744415.png

Jed_Campbell_1-1674250904700.png

 

 

dt1 = open ("$SAMPLE_DATA/Hot Dogs.jmp");
dt2 = open ("$SAMPLE_DATA/Hot Dogs2.jmp");

dt1 << Delete rows (1); //to make an outer join possible
dt2 << delete rows (2); //to make an outer join possible

dtjoined = dt1 << Join(
	With( dt2 ),
	Match Flag( 1 ), //<-use this later
	By Matching Columns( :Product Name = :Product Name ),
	Drop multiples( 0, 0 ),
	Include Nonmatches( 1, 1 ),
	Preserve main table order( 1 ),
	Output Table( "joined" )
);

dtjoined << Select Where (:Match Flag == 3); //JMP uses column values for the text
dtjoined << delete rows ();

 

 

 

 

Lavik17
Level II

Re: Is there a "true" outer-join in JMP?

Thank you, this would work!

jthi
Super User

Re: Is there a "true" outer-join in JMP?

Is this the situation you are looking for?

jthi_2-1674250826473.png

You could enable Match Flag, perform full outer join and remove rows which have Match Flags "Both".

jthi_0-1674250557239.png

jthi_1-1674250563731.png

-Jarmo
Lavik17
Level II

Re: Is there a "true" outer-join in JMP?

Thank you!

I wish there was an "outer join" option to check when doing a join operation.