cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Kevin
Level II

How to join tables with time interval

Hello,

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.

 

Appreciate if anyone can show me how.

 

Thanks

1 REPLY 1
jthi
Super User

Re: How to join tables with time interval

I would most likely try using SQL query with JMP tables. You can do this with Query()

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' >= t2.'Start Time' and t1.'Time' <= t2.'End Time'
      ]\"
);
-Jarmo

Recommended Articles