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-568253%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3EApertura%20de%20un%20rango%20de%20fechas%20espec%C3%ADfico%20desde%20tablas%20SQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-568253%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3EAbro%20muchas%20tablas%20desde%20SQL%20y%20me%20gustar%C3%ADa%20poder%20abrir%20solo%20los%207%20d%C3%ADas%20anteriores.%20Entonces%2C%20cuando%20ejecuto%20el%20script%2C%20quiero%20que%20mire%20la%20columna%20de%20fecha%20y%20hora%20en%20la%20tabla%20SQL%20y%20abra%20solo%20los%20datos%20de%20los%207%20d%C3%ADas%20anteriores.%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3EAqu%C3%AD%20est%C3%A1%20mi%20script%20de%20mesa%20abierta%3A%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EBase%20de%20datos%20abierta(%3CBR%20%2F%3E%20%22DSN%3D0.20%3BUID%3D****%3D****%3BAPP%3DJMP%3BWSID%3DVJDSTATION%3BBASE%20DE%20DATOS%3DBioControl%3B%22%2C%3CBR%20%2F%3E%20%22SELECCIONAR%20*%20DE%20dbo.VisitLog%22%2C%20%22VisitLog%22%3CBR%20%2F%3E%20)%3B%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3ELa%20columna%20a%20la%20que%20quiero%20hacer%20referencia%20es%20VisitStart%2C%20que%20es%20una%20columna%20de%20fecha%20y%20hora.%20B%C3%A1sicamente%2C%20quiero%20poder%20decir%20que%20quiero%20abrir%20todos%20los%20datos%20%26gt%3B%20Hoy()%20-%20en%20d%C3%ADas(7)%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%C2%A1Por%20favor%20ayuda!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-568253%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3EAcceso%20a%20datos%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-568328%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Abrir%20un%20rango%20de%20fechas%20espec%C3%ADfico%20desde%20tablas%20SQL%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-568328%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EEsta%20es%20una%20pregunta%20de%20SQL%2C%20y%20depende%20del%20tipo%20de%20base%20de%20datos%20que%20est%C3%A9%20consultando.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Epodr%C3%ADas%20intentarlo%3C%2FP%3E%3CP%3E%3CCODE%3ESELECCIONE%20*%20DESDE%20dbo.VisitLog%20DONDE%20CreateDate%20%26gt%3B%20SYSDATE%20-%207%3C%2FCODE%3E%3C%2FP%3E%3CP%3ESi%20se%20trata%20de%20una%20base%20de%20datos%20Oracle%2C%20esto%20deber%C3%ADa%20funcionar.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar

Opening a specific date range from SQL tables

I open a lot of tables from SQL and I would like to be able to open just the previous 7 days. So when I run the script I want it to look at the date/time column on the sql table and open only the data for the previous 7 days. 

 

Here is my open table script:


Open Database(
"DSN=0.20;UID=****=****;APP=JMP;WSID=VJDSTATION;DATABASE=BioControl;",
"SELECT * FROM dbo.VisitLog", "VisitLog"
);

 

The column I want to reference is VisitStart which is a datetime column. I want to essentially be able to say I want to open all data > Today() - in days(7)


Please help!

1 REPLY 1
ErraticAttack
Level VI

Re: Opening a specific date range from SQL tables

This is a SQL question -- and it depends on they type of database you're querying.

 

You might try

SELECT * FROM dbo.VisitLog WHERE CreateDate > SYSDATE - 7

If it is an Oracle database then this should work. 

Jordan

Recommended Articles