cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

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

SQL Query custom expression - date range

I am trying to pre-filter a Query based on date range, but can't figure out how to get it to work.  I keep getting this error.  I have to be missing something simple, right?

 

JMP Query Error.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
ErraticAttack
Level VI

Re: SQL Query custom expression - date range

Try using

SYSDATE - 180
Jordan

View solution in original post

3 REPLIES 3
ErraticAttack
Level VI

Re: SQL Query custom expression - date range

Try using

SYSDATE - 180
Jordan
Phil_Nash
Level II

Re: SQL Query custom expression - date range

I wasn't thinking that I needed to write it in SQL... d'uh.

 

This worked;

t4.Date >= CAST(DATEADD(DAY, -180, GETDATE()) as DATE)

Georg
Level VII

Re: SQL Query custom expression - date range

You Don't need to, but I really recommend this way, because it is easy and most effective. Btw I think you don't have to typecast the date, if database column is Set up correctly You can compare as date/number directly. Of course you can Do in JSL as well, but more complicated.

Georg

Recommended Articles