x
login about faq Site discussion (meta-askssc)

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 '09 at 12:18 PM in Default

Raj More gravatar image

Raj More
1.7k 74 78 82

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

Nov 18 '09 at 08:03 AM Gustavo

Yes they return the same resultset.

Nov 18 '09 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 '09 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 '09 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



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x141
x50

asked: Nov 13 '09 at 12:18 PM

Seen: 1491 times

Last Updated: Nov 13 '09 at 12:18 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.