Re: To-Date Calculations
Date: Fri, 13 Oct 2000 17:03:32 GMT
Message-ID: <EfHF5.568$p2.68270_at_news.flash.net>
column month_number noprint
break on month_name skip on report
compute sum of weekly_order_amount on month_name
compute sum of weekly_order_amount on report
select to_char(order_date,'Month') month_name
, to_number(order_date,'mm') month_number , sum(order_amount)
from orders
group by to_char(order_date,'Month')
,to_number(order_date,'mm') order by month_number
C Briney <cbriney_at_mindspring.com> wrote in message
news:8rl4ad$v98$1_at_slb6.atl.mindspring.net...
> What solution would you recommend to support to-date calculations using an
> Oracle 8i Data Server? For example, order amount is captured weekly and a
> report needs to also show month-to-date and year-to-date order amount
> totals.
>
> The solution I have chosen is to use a view on top of a view where the
fact
> table with the weekly order amounts is joined to a time dimension table. I
> was told by the developers that there is no built-in feature/function in
> Oracle Reports and Oracle Discoverer to help with this. Therefore, views
> were used because it simplified access for Oracle Reports and Oracle
> Discoverer, plus a special table did not have to be built with
precalculated
> values.
>
> Can Oracle Reports or Oracle Discoverer handle to-date calculations
without
> creating special views (or tables)?
>
>
Received on Fri Oct 13 2000 - 19:03:32 CEST