<?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: Joining differnt size data sets in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Joining-differnt-size-data-sets/m-p/213138#M42653</link>
    <description>&lt;P&gt;You can also use the Tables &amp;gt; Update command.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 &amp;lt;&amp;lt; Update(
	With( dt2 ),
	Match Columns( :JAR ID = :JAR ID, :SEQ ID = :SEQ ID ),
	Add Columns from Update table( :TOTE ID )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 14 Jun 2019 19:07:34 GMT</pubDate>
    <dc:creator>pmroz</dc:creator>
    <dc:date>2019-06-14T19:07:34Z</dc:date>
    <item>
      <title>Joining differnt size data sets</title>
      <link>https://community.jmp.com/t5/Discussions/Joining-differnt-size-data-sets/m-p/212972#M42615</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.JPG" style="width: 324px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17746i666546C9B7E4DFB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.JPG" alt="1.JPG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.JPG" style="width: 233px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17745i34E6CA1DAE580D42/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.JPG" alt="2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to pull a data point from one data table into another data table. Above is an example. A simple join does not seem to get me where I need to go. The data table on the left in reality is quite large(800K rows). I would like to match between the two data tables based on jar id and seq id. Then create a new column in the table on the left with the TOTE ID and populate it with data from the table on the right (which is much smaller 70k rows) with a successful match. So&amp;nbsp;any given&amp;nbsp;TOTE ID from the data table on the right will&amp;nbsp;get used repeatedly populating the table on the left. Thank you for your assistance.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2019 16:06:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Joining-differnt-size-data-sets/m-p/212972#M42615</guid>
      <dc:creator>Sciguy_1</dc:creator>
      <dc:date>2019-06-13T16:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Joining differnt size data sets</title>
      <link>https://community.jmp.com/t5/Discussions/Joining-differnt-size-data-sets/m-p/212990#M42621</link>
      <description>&lt;P&gt;What you want to do is a simple join of the data tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Tables==&amp;gt;Join&lt;/P&gt;
&lt;P&gt;Below is the JSL that will do the join, however this can easily be done in an interactive mode&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

// Create Sample data tables
dt1 = New Table( "Base",
	Add Rows( 10 ),
	New Column( "Tube ID",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] )
	),
	New Column( "JAR ID",
		Character,
		"Nominal",
		Set Values(
			{"XXXY1", "XXXY1", "XXXY2", "XXXY2", "XXXY3", "XXXY3", "XXXY1", "XXXY1",
			"XXXY3", "XXXY3"}
		),
		Set Display Width( 92 )
	),
	New Column( "SEQ ID",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [1001, 1001, 1002, 1002, 1003, 1003, 1001, 1001, 1003, 1003] ),
		Set Display Width( 131 )
	)
);
dt2 = New Table( "Lookup",
	Add Rows( 5 ),
	New Column( "JAR ID",
		Character,
		"Nominal",
		Set Values( {"XXXY1", "XXXY2", "XXXY3", "XXXY4", "XXXY5"} ),
		Set Display Width( 72 )
	),
	New Column( "SEQ ID",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values( [1001, 1002, 1003, 1004, 1005] ),
		Set Display Width( 80 )
	),
	New Column( "TOTE ID",
		Character,
		"Nominal",
		Set Values( {"AAA1", "AAA2", "AAA3", "AAA4", "AAA5"} )
	)
);

// Join the tables
dtJoin = dt1 &amp;lt;&amp;lt; Join(
	With( dt2 ),
	Merge Same Name Columns,
	Match Flag( 0 ),
	By Matching Columns( :JAR ID = :JAR ID, :SEQ ID = :SEQ ID ),
	Drop multiples( 0, 0 ),
	Include Nonmatches( 1, 0 ),
	Preserve main table order( 1 ),
	Output Table( "Joined" )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jun 2019 16:39:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Joining-differnt-size-data-sets/m-p/212990#M42621</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-06-13T16:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Joining differnt size data sets</title>
      <link>https://community.jmp.com/t5/Discussions/Joining-differnt-size-data-sets/m-p/213022#M42622</link>
      <description>Thank you for the help on this! I was not checking to include non-matches. Got it working thank you.</description>
      <pubDate>Thu, 13 Jun 2019 19:20:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Joining-differnt-size-data-sets/m-p/213022#M42622</guid>
      <dc:creator>Sciguy_1</dc:creator>
      <dc:date>2019-06-13T19:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Joining differnt size data sets</title>
      <link>https://community.jmp.com/t5/Discussions/Joining-differnt-size-data-sets/m-p/213138#M42653</link>
      <description>&lt;P&gt;You can also use the Tables &amp;gt; Update command.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 &amp;lt;&amp;lt; Update(
	With( dt2 ),
	Match Columns( :JAR ID = :JAR ID, :SEQ ID = :SEQ ID ),
	Add Columns from Update table( :TOTE ID )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Jun 2019 19:07:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Joining-differnt-size-data-sets/m-p/213138#M42653</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2019-06-14T19:07:34Z</dc:date>
    </item>
  </channel>
</rss>

