Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: table containing the days for a week
Kevin Crosbie wrote:
> <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;
May work.
SQL> select count(*) from user_objects;
COUNT(*)
1
May not.
It would certainly be much more inefficient.
-- MJBReceived on Tue Apr 26 2005 - 12:06:21 CDT
![]() |
![]() |