<?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 different tables with a general script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908258#M106653</link>
    <description>&lt;P&gt;Is there a way to make the script 'general'? So you don't have to specify the column names within the script?&lt;/P&gt;
&lt;P&gt;Maybe have the script take the column names from the data itself?&lt;/P&gt;</description>
    <pubDate>Fri, 17 Oct 2025 11:53:49 GMT</pubDate>
    <dc:creator>Tina442</dc:creator>
    <dc:date>2025-10-17T11:53:49Z</dc:date>
    <item>
      <title>Joining different tables with a general script</title>
      <link>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908247#M106651</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I know we can join tables easily under the Table header, but I'm trying to develop a script that would be able to join tables without having to specify the column names.&lt;/P&gt;
&lt;P&gt;I have three data tables. The first two columns are always the same, but the others can always change its name. It gets more complicated because for a different batch, I can the same three data tables but the name of the first two columns could change. So I am trying to join all these three tables using the first two column position as the linking column and add the other columns altogether into one big data table.&lt;/P&gt;
&lt;P&gt;I tried using variables or column positions but it didn't work. Tried also with the New SQL Query() function but I think that also has to specify columns.&lt;/P&gt;
&lt;P&gt;Does anyone have an idea on how we can develop a general script that can simply join three different tables into one?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 10:43:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908247#M106651</guid>
      <dc:creator>Tina442</dc:creator>
      <dc:date>2025-10-17T10:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Joining different tables with a general script</title>
      <link>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908257#M106652</link>
      <description>&lt;P&gt;Easiest would be to write a script which would rename the columns to be the same but it is also possible to write a script to use different column names.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 10:52:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908257#M106652</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-10-17T10:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Joining different tables with a general script</title>
      <link>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908258#M106653</link>
      <description>&lt;P&gt;Is there a way to make the script 'general'? So you don't have to specify the column names within the script?&lt;/P&gt;
&lt;P&gt;Maybe have the script take the column names from the data itself?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 11:53:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908258#M106653</guid>
      <dc:creator>Tina442</dc:creator>
      <dc:date>2025-10-17T11:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: Joining different tables with a general script</title>
      <link>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908262#M106654</link>
      <description>&lt;P&gt;I figured out the script:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;dt = {Data Table ("X"), Data Table ("Y"), Data Table ("Z")};&lt;/P&gt;
&lt;P&gt;// Start with the first table as base&lt;BR /&gt;joinedDT = dt[1];&lt;BR /&gt;// Sequentially join each remaining table to the accumulated result&lt;BR /&gt;For(i = 2, i &amp;lt;= N Items(dt), i++,&lt;BR /&gt;tmpDT = joinedDT &amp;lt;&amp;lt; Join(&lt;BR /&gt;With(responseTables[i]),&lt;BR /&gt;Drop Multiples(1,1),&lt;BR /&gt;Include Nonmatches(0,0),&lt;BR /&gt;Merge Same Name Columns,&lt;BR /&gt;Preserve Main Table Order(1)&lt;BR /&gt;);&lt;/P&gt;
&lt;P&gt;// Rename the intermediate table&lt;BR /&gt;tmpDT &amp;lt;&amp;lt; Set Name("Intermediary Data Table");&lt;/P&gt;
&lt;P&gt;// Replace joinedDT with the newly joined table for next iteration&lt;BR /&gt;joinedDT = tmpDT;&lt;BR /&gt;);&lt;/P&gt;
&lt;P&gt;I wished there were more information in the scripting index about this part of the Join function:&lt;BR /&gt;&lt;BR /&gt;Drop Multiples(1,1),&lt;BR /&gt;Include Nonmatches(0,0),&lt;BR /&gt;Merge Same Name Columns,&lt;BR /&gt;Preserve Main Table Order(1)&lt;BR /&gt;&lt;BR /&gt;I had to go trial and error to figure it out!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 13:19:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908262#M106654</guid>
      <dc:creator>Tina442</dc:creator>
      <dc:date>2025-10-17T13:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: Joining different tables with a general script</title>
      <link>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908344#M106668</link>
      <description>&lt;P&gt;Doing it interactively in JMP is generally the way to learn things like this in JMP. And you can go to Help page from Scripting Index and it does have more explanation&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/18.2/#page/jmp/join-data-tables.shtml?os=win&amp;amp;source=application#ww251573" target="_blank" rel="noopener"&gt; Using JMP &amp;gt; Reshape Your Data &amp;gt; Join Data Tables&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 16:28:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908344#M106668</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-10-17T16:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Joining different tables with a general script</title>
      <link>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908576#M106711</link>
      <description>&lt;P&gt;Thank you, I didn't know it goes directly to the support page. That's useful, but it doesn't have an explanation of the script. That's what I was looking for since I wanted to script it to build an add-in that does it automatically.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Oct 2025 09:18:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908576#M106711</guid>
      <dc:creator>Tina442</dc:creator>
      <dc:date>2025-10-20T09:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Joining different tables with a general script</title>
      <link>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908689#M106721</link>
      <description>&lt;P&gt;JSL Syntax Reference is sometimes better than the Help page Scripting Guide opens (sometimes it does refer to JSL Syntax Reference)&lt;/P&gt;
&lt;P&gt;&lt;A href="https://origin-www.jmp.com/support/help/en/18.2/#page/jmp/data-table-messages.shtml#ww3254028" target="_blank" rel="noopener"&gt;JSL Syntax Reference &amp;gt; JSL Messages &amp;gt; Data Table Messages&lt;/A&gt;&amp;nbsp;and look for &amp;lt;&amp;lt;Join(&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_4-1761017272485.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/85415iB1824E759F464D5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_4-1761017272485.png" alt="jthi_4-1761017272485.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can find .pdf version if JSL Syntax Reference (I prefer that JMP Help's search is something else...) from&amp;nbsp;&lt;A href="https://www.jmp.com/en/support/jmp-documentation" target="_blank" rel="noopener"&gt;JMP documentation.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, help page does explain the options but it can be a bit more difficult to fully understand it from the platform help page:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Drop Multiples(1,1),&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1761016995300.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/85411i29557A7163FB8AB7/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_0-1761016995300.png" alt="jthi_0-1761016995300.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Include Nonmatches(0,0),
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1761017018380.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/85412i0A28EDA77035A072/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_1-1761017018380.png" alt="jthi_1-1761017018380.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Merge Same Name Columns,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_2-1761017040399.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/85413iCA5347F538B8E8E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_2-1761017040399.png" alt="jthi_2-1761017040399.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Preserve Main Table Order(1)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_3-1761017079167.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/85414iA3FF5415ABE9B41A/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_3-1761017079167.png" alt="jthi_3-1761017079167.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In general, trial and error (or letting JMP script for you) is good way to start learning JSL.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Oct 2025 03:29:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/908689#M106721</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-10-21T03:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Joining different tables with a general script</title>
      <link>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/909412#M106810</link>
      <description>&lt;P&gt;That's very helpful, thank you very much for pointing me to the right direction!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2025 10:49:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Joining-different-tables-with-a-general-script/m-p/909412#M106810</guid>
      <dc:creator>Tina442</dc:creator>
      <dc:date>2025-10-23T10:49:31Z</dc:date>
    </item>
  </channel>
</rss>

