dbTalk Databases Forums  

Named Set

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


Discuss Named Set in the microsoft.public.sqlserver.olap forum.



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

Default Named Set - 05-06-2004 , 02:34 PM






Hello,

I am wanting to get a result set like

Unit Sales
Ca 10
OR 20
Food 30
Drink 40

Ex
with set myset as '{[Store].[All Stores].[USA].[CA],
[Store].[All Stores].[USA].[OR],[Product].[All Products].
[Drink],[Product].[All Products].[Food]}'

Select {[Measures].[Unit Sales]} on columns,
myset on rows
from sales


of course a named set only takes 1 dimensions members.

any ideas

TIA

Steve

Reply With Quote
  #2  
Old   
Brian Altmann
 
Posts: n/a

Default RE: Named Set - 05-07-2004 , 08:46 AM






Actually, Sets are made up of tuples so this would return what you want, and you can clean up format in the client app

with set myset as '{
([Store].[All Stores].[USA].[CA],[Product].[All Products])
([Store].[All Stores].[USA].[OR],[Product].[All Products])
([Store].[All Stores],[Product].[All Products].[Drink])
([Store].[All Stores],[Product].[All Products].[Food])}

Select {[Measures].[Unit Sales]} on columns
myset on row
from sale

HTH
Bria
www.geocities.com/brianaltmann/olap.htm


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.