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

Home -> Community -> Usenet -> c.d.o.misc -> Re: this cannot be then best way

Re: this cannot be then best way

From: Ed Prochak <edprochak_at_gmail.com>
Date: 14 Jul 2006 11:33:47 -0700
Message-ID: <1152902027.807912.167130@75g2000cwc.googlegroups.com>

g wrote:
> I have a date mydate and i want to subtract X working days off
>
> i was thinking of something like
>
> loop while x > 0
> if to_char(mydate,'d') < 6 then
> x = x -1
> endif
> mydate :mydate - 1
> endloop
>
> any ideas

If X tends to be large (>2weeks),
then save a few passes thru the loop by

HTH,
ed Received on Fri Jul 14 2006 - 13:33:47 CDT

Original text of this message

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