Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: this cannot be then best way
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
Just a quick note: TO_CHAR does not produce a number and essentially none of the code, above, is valid. It will never run in Oracle. What product do you have?
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Fri Jul 14 2006 - 16:52:36 CDT