Joined: 09 May 2014
Location: United States
Online Status: Offline
Posts: 3
Topic: NOT BETWEEN substitute in Crystal XI Posted: 09 May 2014 at 7:17am
In my WHERE section in my SQL script I have a statement that uses NOT BETWEEN and I need to convert into my Crystal Report which is not an option in Crystal. Any suggestions on how to do this?
Basically I have a date field that I am checking to make sure it is not between the first day of the current month in the prior year AND the last day of the current month in the prior year. So if this was ran today then I am checking to make sure my date field is not between 05/01/13-05/31/13. Clear as mud?
Table_Name.Date_Field NOT BETWEEN (TRUNC(ADD_MONTHS (LAST_DAY(SYSDATE)+1, -13)) ) AND (TRUNC (ADD_MONTHS( LAST_DAY (SYSDATE), -12)))
Joined: 09 May 2014
Location: United States
Online Status: Offline
Posts: 3
Posted: 12 May 2014 at 7:42am
Thank you both for your help!!
The only part I am not getting correct is in the following statement I need to return the last day of the month. Is there a function that I can use to return the last day of the month? I am not finding that so far.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum