Re: Need help with date range inclusion.
Date: Tue, 17 May 1994 11:50:26 GMT
Message-ID: <Cpy3K2.JB3_at_carmen.logica.co.uk>
In article <H858Lc1w165w_at_vicuna.ocunix.on.ca>, frampton_at_vicuna.ocunix.on.ca (Steve Frampton) says:
>
>lscott_at_crl.com (L. Scott Johnson) writes:
>
>> In article <J3i5Lc1w165w_at_vicuna.ocunix.on.ca>,
>> I think you're saying that you want the 'to' date mapped to the closest
>> Saturday >= the given date. If so, try:
>>
>> and start_date <= next_day(to_date(&to_date,'YYMMDD'),'SATURDAY')
>
>Excellent! That is exactly what I needed, thanks... but it brings up
>another question. I am working on another portion of the script and need
>the functionality of prev_day (opp. of next_day()). Since SQL*Plus
>doesn't seem to offer such a function, what is the best way of
>implementing it?
>
>Thanks again...
Why not use the same method ? i.e. subtract 7 days from prev_day and then look for the *next* Saturday ? Received on Tue May 17 1994 - 13:50:26 CEST