x

Difference between Comma and Asterisk

Can someone please explain to me the difference between the following queries

SELECT
    NON EMPTY {([Measures].[MeasureName])} ON COLUMNS,
    NON EMPTY
    {(
        [Dimension01].[ColumnName01].AllMembers
        * [Dimension02].[ColumnName03].AllMembers
        * [Time Period].[WeekStartDate].AllMembers
    )} 
    DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM [CubeName]

and now using commas

SELECT
    NON EMPTY {([Measures].[MeasureName])} ON COLUMNS,
    NON EMPTY
    {(
        [Dimension01].[ColumnName01].AllMembers,
        [Dimension02].[ColumnName03].AllMembers,
        [Time Period].[WeekStartDate].AllMembers
    )} 
    DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
FROM [CubeName]
more ▼

asked Nov 13, 2009 at 12:18 PM in Default

avatar image

Raj More
1.8k 82 87 90

When you run these queries against your environment what where the results on both cases ? Does they return the same resultset ?

Nov 18, 2009 at 08:03 AM Gustavo

Yes they return the same resultset.

Nov 18, 2009 at 01:55 PM Raj More
(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

I really don't know anything about MDX, but I'm gonna venture a guess that the asterisk is the multiplication operator and the comma defines 3 different columns. Again, just a guess although BOL does state that the asterisk is the multiplication operator.

more ▼

answered Nov 16, 2009 at 11:28 AM

avatar image

Jack Corbett
1.1k 3 4 7

can you post a link to the BOL topic

Nov 18, 2009 at 01:55 PM Raj More
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x198
x93

asked: Nov 13, 2009 at 12:18 PM

Seen: 2856 times

Last Updated: Nov 13, 2009 at 12:18 PM

Copyright 2016 Redgate Software. Privacy Policy