<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: JMP Join Tables with 2 or more Column matching with Logical &amp;quot;OR in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JMP-Join-Tables-with-2-or-more-Column-matching-with-Logical-quot/m-p/50875#M28907</link>
    <description>Thank you Jim.</description>
    <pubDate>Wed, 07 Feb 2018 20:07:14 GMT</pubDate>
    <dc:creator>ram</dc:creator>
    <dc:date>2018-02-07T20:07:14Z</dc:date>
    <item>
      <title>JMP Join Tables with 2 or more Column matching with Logical "OR</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-Join-Tables-with-2-or-more-Column-matching-with-Logical-quot/m-p/50466#M28687</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am looking to dig into if there is a solution already exist for below problem.&lt;/P&gt;&lt;P&gt;Say i have&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table A with 3 columns "X", "Y" &amp;amp; "Z"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table B with 1 column "R"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Column R already contains some values of X and Y.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to merge Table A and Table B like ---&amp;gt;&amp;nbsp; Match column (X=R) OR&amp;nbsp;Match column (Y=R)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can it be done with JSL or something?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ram&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:13:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-Join-Tables-with-2-or-more-Column-matching-with-Logical-quot/m-p/50466#M28687</guid>
      <dc:creator>ram</dc:creator>
      <dc:date>2023-06-10T23:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: JMP Join Tables with 2 or more Column matching with Logical "OR</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-Join-Tables-with-2-or-more-Column-matching-with-Logical-quot/m-p/50475#M28691</link>
      <description>&lt;P&gt;I thing you can accomplish what you want with 2 simple joins....see my script where one does not know if a name in one data table is the first or last name in the other data table&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);

// Create Sample Data
dt1 = New Table( "First and Last names",
	Add Rows( 10 ),
	New Column("Firstname",Character,
		"Nominal",
		Set Values(
			{"KATIE", "LOUISE", "JANE", "JACLYN", "LILLIE", "TIM", "JAMES", "ROBERT",
			"BARBARA", "ALICE"}
		)
	),
	New Column("lastname", Character,
		"Nominal",
		Set Values(
			{"McMillan", "Johnson", "Jones", "Smith", "McDonald", "Carson", "Brady",
			"Williams", "Wilt", "Hamilton"}
		)
	),
	New Column( "sex", Character( 1 ),
		"Nominal",
		Set Values( {"F", "F", "F", "F", "F", "M", "M", "M", "F", "F"} )
	),
	New Column("height",
		Numeric,
		"Continuous",
		Format( "Fixed Dec", 5, 0 ),
		Set Values( [59, 61, 55, 66, 52, 60, 61, 51, 60, 61] )
	),
	New Column("weight",
		Numeric,
		"Continuous",
		Format( "Fixed Dec", 5, 0 ),
		Set Values( [95, 123, 74, 145, 64, 84, 128, 79, 112, 107] )
	),
	Set Label Columns( :Firstname )
);

dt2 = New Table( "ages",
	New Column( "Unknown names",
		Character,
		"Nominal",
		Set Values(
			{"KATIE", "LOUISE", "Jones", "JACLYN", "LILLIE", "Carson", "JAMES",
			"ROBERT", "Wilt", "ALICE"}
		
	)),
	New Column( "age", Numeric,
		"Ordinal",
		Format( "Fixed Dec", 5, 0 ),
		Set Values( [12, 12, 12, 12, 12, 12, 12, 12, 13, 13] )
	),
	Set Label Columns( :Unknown Names )
);

// Join Firstnames with the unknown names
dt3 = dt1 &amp;lt;&amp;lt; Join(
	With( dt2 ),
	Merge Same Name Columns,
	By Matching Columns( :Firstname = :Unknown names ),
	Drop multiples( 0, 0 ),
	Include Nonmatches( 1, 0 ),
	Preserve main table order( 1 )
);

// Join the Lastnames with the unknown names
dt4 = dt3 &amp;lt;&amp;lt; Join(
	With( dt2 ),
	Merge Same Name Columns,
	By Matching Columns( :Lastname = :Unknown names ),
	Drop multiples( 0, 0 ),
	Include Nonmatches( 1, 0 ),
	Preserve main table order( 1 )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Jan 2018 20:59:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-Join-Tables-with-2-or-more-Column-matching-with-Logical-quot/m-p/50475#M28691</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-01-30T20:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: JMP Join Tables with 2 or more Column matching with Logical "OR</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-Join-Tables-with-2-or-more-Column-matching-with-Logical-quot/m-p/50875#M28907</link>
      <description>Thank you Jim.</description>
      <pubDate>Wed, 07 Feb 2018 20:07:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-Join-Tables-with-2-or-more-Column-matching-with-Logical-quot/m-p/50875#M28907</guid>
      <dc:creator>ram</dc:creator>
      <dc:date>2018-02-07T20:07:14Z</dc:date>
    </item>
  </channel>
</rss>

