hi,guys
i have a sql like this:
select billingcyclid as month,
sum(case when to_char(recstatchgdate,'YYYYMMDD')>
to_char(add_months(to_date (billingcyclid||'25','YYYYMMDD'),1),'YYYYMMDD')
then fee
else 0 end) as mounts
from tab_billdetail
where recstat='10'
AND TO_CHAR(recstatchgdate,'YYYYMMDD')>='20020926'
AND TO_CHAR(recstatchgdate,'YYYYMMDD')<='20021025'
group by billingcyclid
and data from it is like:
month mounts
2002-01 $12232.45
2002-02 $45234
2002-03 $67890
. .
. .
. .
total: $22347.21
in impromptu, i use "sample list" to do it.but the last row
of "total", i can't generate it.
if use "crosstab", "input SQL directly" is not allowed.but
the last row of "total" is easy to generate.
In my opinion, i don't want to create view in database or use hotfiles in impromptu. although they can do.
Count anyone can give me a hint?
thank you.
i have a sql like this:
select billingcyclid as month,
sum(case when to_char(recstatchgdate,'YYYYMMDD')>
to_char(add_months(to_date (billingcyclid||'25','YYYYMMDD'),1),'YYYYMMDD')
then fee
else 0 end) as mounts
from tab_billdetail
where recstat='10'
AND TO_CHAR(recstatchgdate,'YYYYMMDD')>='20020926'
AND TO_CHAR(recstatchgdate,'YYYYMMDD')<='20021025'
group by billingcyclid
and data from it is like:
month mounts
2002-01 $12232.45
2002-02 $45234
2002-03 $67890
. .
. .
. .
total: $22347.21
in impromptu, i use "sample list" to do it.but the last row
of "total", i can't generate it.
if use "crosstab", "input SQL directly" is not allowed.but
the last row of "total" is easy to generate.
In my opinion, i don't want to create view in database or use hotfiles in impromptu. although they can do.
Count anyone can give me a hint?
thank you.