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: DA Morgan <damorgan_at_psoug.org>
Date: Fri, 14 Jul 2006 14:52:36 -0700
Message-ID: <1152914395.744409@bubbleator.drizzle.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

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.org
Received on Fri Jul 14 2006 - 16:52:36 CDT

Original text of this message

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