Re: Need help with date range inclusion.
Date: 11 May 1994 04:42:02 -0700
Message-ID: <2qqgaa$83o_at_crl2.crl.com>
In article <J3i5Lc1w165w_at_vicuna.ocunix.on.ca>,
Steve Frampton <frampton_at_vicuna.ocunix.on.ca> wrote:
>
>One small hitch, however -- I need to include subsequent U.I. data if the
>range falls within the U.I. period of Sunday-Saturday. So if an end date
>of 31-MAY-94 is given as the 'to' date, I need to report data up to and
>including the next Saturday after the specified date, in this example
>04-JUN-94.
>
I think you're saying that you want the 'to' date mapped to the closest
Saturday >= the given date. If so, try:
>select start_date, ui_gross
>from ec_employee_weekly_ui_data
>where employee_id = &employee_id
>and start_date >= to_date(&from_date,'YYMMDD')
and start_date <= next_day(to_date(&to_date,'YYMMDD'),'SATURDAY')
>order by start_date;
>Steve Frampton E-mail: <frampton_at_vicuna.ocunix.on.ca>
L. Scott Johnson
Senior Programmer
Research Planning, Inc.
(803) 256-7322
Received on Wed May 11 1994 - 13:42:02 CEST