SQL-->MDX -
02-04-2006
, 05:42 PM
Is it possible to write the following sql statement using mdx and if so
HOW?
Thanks in Advance.
Select
office,
sum(case when period < 200601 then tobill_amt else 0 end) as Beg_Bal,
sum(case when period between 200601 and 200602 and Tbl_flag in
('N','M') then tobill_amt else 0 end) as Production,
sum(case when period between 200601 and 200602 and Tbl_flag in ('B')
then Billed_amt else 0 end) as Billing,
sum(case when period between 200601 and 200602 and Tbl_flag in ('B')
then tobill_amt - Billed_amt else 0 end) as Write_UP_Down,
sum(case when period <= 200602 then tobill_amt else 0 end) as End_Bal
from
timetable
where
Period between 1 and 200602 |