Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Calculating the Week of the Year when "Stat Week" runs Sunday through Saturday.
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