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: Calculating the Week of the Year when "Stat Week" runs Sunday through Saturday.

Re: Calculating the Week of the Year when "Stat Week" runs Sunday through Saturday.

From: <ak_tiredofspam_at_yahoo.com>
Date: 8 Feb 2005 14:00:18 -0800
Message-ID: <1107900018.868060.284900@l41g2000cwc.googlegroups.com>


I use a calendar table

CREATE TABLE CALENDAR_DATES(
WEEK_NUM NUMBER(2) NOT NULL,
BUSINESS_DAY_NUM NUMBER NOT NULL,
DAY_DT DATE NOT NULL,
DAY_OF_WEEK NUMBER(1) NOT NULL,--0 - Sun,..., 6 - Sat --- WHATEVER ELSE
);

I also use it for calculations like "15 business days from today", "how many business days between 12/22 and 12/30" and so on. Performs much much better. Received on Tue Feb 08 2005 - 16:00:18 CST

Original text of this message

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