Focal Point
Using between command

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/5487030476

December 24, 2014, 01:44 AM
B_B
Using between command
I am using 'between' command to display current saturdays date and 13 weeks ago saturday date. It throws an error.

Is there any other way if i can use GE or LE?
I have also tried-
WHERE WE_DATE GE '&SAT12AGO' AND LE '&SAT1AGO'

any suggestions?


WebFOCUS 7.6
Windows, All Outputs
December 24, 2014, 02:22 AM
Ram Prasad E
You need to use FROM TO keyword instead of BETWEEN. Try below code.
TABLE FILE EMPLOYEE
PRINT
FIRST_NAME
HIRE_DATE
WHERE HIRE_DATE FROM 800601 TO 850601;
END


Hope this helps.
Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
December 24, 2014, 02:56 AM
Dave
or...
WHERE WE_DATE GE '&SAT12AGO'
WHERE WE_DATE LE '&SAT1AGO'




_____________________
WF: 8.0.0.9 > going 8.2.0.5
December 24, 2014, 08:16 AM
Jay Potter
Is your date format alpha or numeric? You may need to remove the single quotes.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
December 24, 2014, 11:21 AM
George Patton
If I read the question correctly only two dates are wanted, not the entire range from 13 weeks ago till the most recent Saturday.

I think one way to do it would be to set the most recent Saturday as the first day of the week using SET WEEKFIRST and then use DATEADD to subtract 13 weeks.


WebFOCUS 7.7.05 Windows, Linux, DB2, IBM Lotus Notes, Firebird, Lotus Symphony/OpenOffice. Outputs PDF, Excel 2007 (for OpenOffice integration), WP