Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Date calculation when a closed day occure, loop back 1 day until the day is open
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