cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Lavik17
Level III

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 III

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 III

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.

 

Recommended Articles