<?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 join tables based on a substring (whole word as part of a string) in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/join-tables-based-on-a-substring-whole-word-as-part-of-a-string/m-p/662031#M85087</link>
    <description>&lt;P&gt;dear members of the community,&lt;BR /&gt;i have 2 tables. one containing strings and another containing a list of words and numbers. &lt;BR /&gt;i would like to join the table based on whether the string includes the exact word. but not if it pat of another (longer) word.&lt;BR /&gt;for example 'cat' should match only 'cat' and not 'bigcat' as in the image below.&lt;BR /&gt;i have added spaces before and after the terms in order to facilitate. in sql i could use a join command based on LIKE to preform a match based on a substring so adding the spaces helps identify whole words to a certain extent. &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ron_horne_1-1690280495360.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/55250i6A01F75BDC8C499B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ron_horne_1-1690280495360.png" alt="ron_horne_1-1690280495360.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you for any suggestions&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jul 2023 10:26:15 GMT</pubDate>
    <dc:creator>ron_horne</dc:creator>
    <dc:date>2023-07-25T10:26:15Z</dc:date>
    <item>
      <title>join tables based on a substring (whole word as part of a string)</title>
      <link>https://community.jmp.com/t5/Discussions/join-tables-based-on-a-substring-whole-word-as-part-of-a-string/m-p/662031#M85087</link>
      <description>&lt;P&gt;dear members of the community,&lt;BR /&gt;i have 2 tables. one containing strings and another containing a list of words and numbers. &lt;BR /&gt;i would like to join the table based on whether the string includes the exact word. but not if it pat of another (longer) word.&lt;BR /&gt;for example 'cat' should match only 'cat' and not 'bigcat' as in the image below.&lt;BR /&gt;i have added spaces before and after the terms in order to facilitate. in sql i could use a join command based on LIKE to preform a match based on a substring so adding the spaces helps identify whole words to a certain extent. &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ron_horne_1-1690280495360.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/55250i6A01F75BDC8C499B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ron_horne_1-1690280495360.png" alt="ron_horne_1-1690280495360.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you for any suggestions&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 10:26:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/join-tables-based-on-a-substring-whole-word-as-part-of-a-string/m-p/662031#M85087</guid>
      <dc:creator>ron_horne</dc:creator>
      <dc:date>2023-07-25T10:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: join tables based on a substring (whole word as part of a string)</title>
      <link>https://community.jmp.com/t5/Discussions/join-tables-based-on-a-substring-whole-word-as-part-of-a-string/m-p/662034#M85088</link>
      <description>&lt;P&gt;You can use SQL to join tables in JMP using Query (&lt;A href="https://www.jmp.com/support/help/en/17.0/#page/jmp/sql-functions.shtml?os=win&amp;amp;source=application#ww6050839" target="_blank" rel="noopener"&gt;Query(&amp;lt;&amp;lt;dt1|Table(dt1, alias1)&amp;gt;, ..., &amp;lt;dtN, aliasN)&amp;gt;&amp;gt;, &amp;lt;private | invisible&amp;gt;, &amp;lt;scalar&amp;gt;, sqlStatement )&lt;/A&gt;). Part of example from scripting index:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

// Using aliases, performing a join
dtSAT = Open("$SAMPLE_DATA/SATByYear.jmp", Invisible);
dtUS = Open("$SAMPLE_DATA/US Demographics.jmp", Invisible);
Query(
	Table(dtSAT, "t1"),
	Table(dtUS, "t2"), 

	"\[SELECT t1.State, t1."SAT Math", t2."College Degrees",
            t2."Eighth Grade Math"
       FROM t1
       LEFT OUTER JOIN t2
           ON t1.State = t2.State
       WHERE t1.'SAT Math' &amp;gt; 550;
      ]\"
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2023 10:43:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/join-tables-based-on-a-substring-whole-word-as-part-of-a-string/m-p/662034#M85088</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-07-25T10:43:44Z</dc:date>
    </item>
  </channel>
</rss>

