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

Raj More gravatar image

Raj More
1.7k 78 82 84

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

Jack Corbett gravatar image

Jack Corbett
1.1k 2 2 3

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.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

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:

x171
x65

asked: Nov 13, 2009 at 12:18 PM

Seen: 2187 times

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