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: table containing the days for a week

Re: table containing the days for a week

From: Kevin Crosbie <caoimhinocrosbai_at_yahoo.com>
Date: Tue, 26 Apr 2005 16:04:55 +0200
Message-ID: <1114524299.ce948429b751755d99d57cc513e2eea3@teranews>


<pobox002_at_bebub.com> wrote in message
news:1114391236.692176.250100_at_f14g2000cwb.googlegroups.com...
> If you have 9i or up you could use a view like this

Or you could use this subquery:
select to_date('2005-04-16', 'YYYY-MM-DD') + (rownum - 1)

from user_objects

where rownum <= 7;

or if you always want the current week:
select trunc(sysdate, 'DD') + 1 - to_char(sysdate, 'D') + rownum as day_of_week

from user_objects

where rownum <= 7; Received on Tue Apr 26 2005 - 09:04:55 CDT

Original text of this message

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