dbTalk Databases Forums  

SQL-->MDX

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss SQL-->MDX in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MDXNewBe
 
Posts: n/a

Default 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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.