Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Date calculation when a closed day occure, loop back 1 day until the day is open

Re: Date calculation when a closed day occure, loop back 1 day until the day is open

From: Jim Kennedy <kennedy-down_with_spammers_at_attbi.com>
Date: Wed, 21 May 2003 13:51:33 GMT
Message-ID: <FvLya.684731$Zo.146469@sccrnsc03>


Totally unclear as to what you are trying to do. Maybe you are saying update my table set date_to_check=date_closed; commit;
(no looping needed)
Jim

-- 
Replace part of the email address: kennedy-down_with_spammers_at_attbi.com
with family.  Remove the negative part, keep the minus sign.  You can figure
it out.
"Xavier" <xcolinot_at_wanadoo.fr> wrote in message
news:b3432721.0305210429.6903d95b_at_posting.google.com...

> Hi there,
>
> I need a sample code for doing this (newbie to Oracle... Sorry ;)
>
> This is the pseudo code problem (since I dunno how to put that in a
> Oracle SQL):
>
> _______________________________________________________________
> date_to_check = (today - 1 day);
>
> loop while (day_to_check) != closed
> {
> date_to_check = (date_to_check - 1 day);
> }
> _______________________________________________________________
>
> I'm supposed to put that in a SELECT Statement because I have to play
> in a strange DB that needs to do a realtime calculation for percent
> between 2 dates values in the same table with more than 1'000'000
> records... The stranger thing is that theses data can be
> pre-calculated but they don't want the DB to be modified....H E L P
> P L Z
>
> Thanx in Advance,
>
> Xavier
Received on Wed May 21 2003 - 08:51:33 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US