cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

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

custom expression Today() minus seven days in query builder

Attempting to obtain all releases by date (reldate) 7 days ago from ORACLE through ODBC Connection table.

Code below returns the attached error image:

 

SELECT DISTINCT t1.PIN, t1.PCP, t1.LASTNAME, t1.COMDATE,
 t1.RELDATE, t1.JLOCAT, t1.SEX, t1.RELTYPE,
 t1.RELAUTH, t1.RELCUST
FROM schema.table  t1
WHERE  (  (  ( t1.RELDATE >= (Today() - In Days( 7 ))  )

 

2nd question:

Once I get this query straight, does JMP have an automated macro function to run this  jmpquery every Monday morning at 3:00 am?   - I  also have the JMP addon for Excel 2010. 

1 REPLY 1
pmroz
Super User

Re: custom expression Today() minus seven days in query builder

You're missing two close parentheses.

SELECT DISTINCT t1.PIN, t1.PCP, t1.LASTNAME, t1.COMDATE,
 t1.RELDATE, t1.JLOCAT, t1.SEX, t1.RELTYPE,
 t1.RELAUTH, t1.RELCUST
FROM schema.table  t1
WHERE  (  (  ( t1.RELDATE >= (Today() - In Days( 7 ))  ) ) )

If you have Oracle errors try executing the query in a SQL tool like PL/SQL Developer, Toad etc.

Recommended Articles