cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-710471%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ECome%20unire%20tabelle%20con%20intervallo%20di%20tempo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-710471%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECiao%2C%3C%2FP%3E%3CP%3ESto%20lavorando%20per%20unire%20due%20tabelle%2C%20la%20tabella%201%20ha%20i%20dati%20con%20timestamp%20e%20la%20tabella%202%20ha%20l'ora%20di%20inizio%20e%20l'ora%20di%20fine%20di%20ciascuna%20fase%20e%20ciclo.%20Vorrei%20unire%20due%20tabelle%20in%20modo%20che%20la%20tabella%201%20possa%20avere%20colonne%20di%20fase%20e%20ciclo.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EApprezzo%20se%20qualcuno%20pu%C3%B2%20mostrarmi%20come.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGrazie%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-710471%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3EAutomazione%20e%20scripting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-710502%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERi%3A%20Come%20unire%20tabelle%20con%20intervallo%20di%20tempo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-710502%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EMolto%20probabilmente%20proverei%20a%20utilizzare%20la%20query%20SQL%20con%20le%20tabelle%20JMP.%20Puoi%20farlo%20con%3CA%20href%3D%22https%3A%2F%2Fwww.jmp.com%2Fsupport%2Fhelp%2Fen%2F17.2%2F%23page%2Fjmp%2Fsql-functions.shtml%3Fos%3Dwin%26amp%3Bsource%3Dapplication%23ww6050839%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%20Domanda()%3C%2FA%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(1)%3B%0A%0Adt1%20%3D%20Open(%22%24DOWNLOADS%2Ftable1.jmp%22%2C%20Invisible)%3B%0Adt2%20%3D%20Open(%22%24DOWNLOADS%2Ftable2.jmp%22%2C%20Invisible)%3B%0A%0Adt3%20%3D%20Query(%0A%20Table(dt1%2C%20%22t1%22)%2C%0A%20Table(dt2%2C%20%22t2%22)%2C%20%0A%20%22%5C%5BSELECT%20*%0A%20%20%20%20%20%20%20FROM%20t1%0A%20%20%20%20%20%20%20left%20join%20t2%20on%20t1.'Time'%20%26gt%3B%3D%20t2.'Start%20Time'%20and%20t1.'Time'%20%26lt%3B%3D%20t2.'End%20Time'%0A%20%20%20%20%20%20%5D%5C%22%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
Kevin
Level I

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