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.
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