<?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: How to join tables with time interval in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-join-tables-with-time-interval/m-p/710502#M89447</link>
    <description>&lt;P&gt;I would most likely try using SQL query with JMP tables. You can do this with &lt;A href="https://www.jmp.com/support/help/en/17.2/#page/jmp/sql-functions.shtml?os=win&amp;amp;source=application#ww6050839" target="_blank" rel="noopener"&gt;Query()&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt1 = Open("$DOWNLOADS/table1.jmp", Invisible);
dt2 = Open("$DOWNLOADS/table2.jmp", Invisible);

dt3 = Query(
	Table(dt1, "t1"),
	Table(dt2, "t2"), 
	"\[SELECT *
       FROM t1
       left join t2 on t1.'Time' &amp;gt;= t2.'Start Time' and t1.'Time' &amp;lt;= t2.'End Time'
      ]\"
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 19 Dec 2023 19:37:10 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2023-12-19T19:37:10Z</dc:date>
    <item>
      <title>How to join tables with time interval</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-join-tables-with-time-interval/m-p/710471#M89444</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am working to join two tables, table 1 has time stamped data, and table 2 has start time and end time of each phase and cycle. I would like to join two tables so that table 1 can have phase and cycle columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate if anyone can show me how.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 19:03:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-join-tables-with-time-interval/m-p/710471#M89444</guid>
      <dc:creator>Kevin</dc:creator>
      <dc:date>2023-12-19T19:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to join tables with time interval</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-join-tables-with-time-interval/m-p/710502#M89447</link>
      <description>&lt;P&gt;I would most likely try using SQL query with JMP tables. You can do this with &lt;A href="https://www.jmp.com/support/help/en/17.2/#page/jmp/sql-functions.shtml?os=win&amp;amp;source=application#ww6050839" target="_blank" rel="noopener"&gt;Query()&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt1 = Open("$DOWNLOADS/table1.jmp", Invisible);
dt2 = Open("$DOWNLOADS/table2.jmp", Invisible);

dt3 = Query(
	Table(dt1, "t1"),
	Table(dt2, "t2"), 
	"\[SELECT *
       FROM t1
       left join t2 on t1.'Time' &amp;gt;= t2.'Start Time' and t1.'Time' &amp;lt;= t2.'End Time'
      ]\"
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Dec 2023 19:37:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-join-tables-with-time-interval/m-p/710502#M89447</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-19T19:37:10Z</dc:date>
    </item>
  </channel>
</rss>

