Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: newbie: A Quickie for some guru out there.
> What are you thinking?
I am thinking a solution like that
select to_char(add_month(
to_date('startdate','MON-YYYY'),rownum),'MON-YYYY',0
from all_tab_columns (or any table of your choice...better if it
contains hundreds of rows instead millions :)
where rownum =< (the range of months you would like to have e.g. 12 for
a year)
this would generate a virtual table without having a physical table so
> SELECT
> TO_CHAR( trunc( workdate, 'month' ), 'MON-YYYY' ) AS Month,
> ROUND( SUM( requesthours ))
> FROM
(select to_char(add_month(
to_date('JAN-2001','MON-YYYY'),rownum),
'MON-YYYY') workdate,0 requesthours from any_tab
does it works?
ciao Received on Tue Sep 17 2002 - 07:16:22 CDT