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 -> Date calculation when a closed day occure, loop back 1 day until the day is open

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

From: Xavier <xcolinot_at_wanadoo.fr>
Date: 21 May 2003 05:29:30 -0700
Message-ID: <b3432721.0305210429.6903d95b@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 - 07:29:30 CDT

Original text of this message

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