calculated member

What is the difference between create member and WITH member? Is it the scope? WITH is for query scoped calculated members. Does Create member last for the entire transaction? Where does it resides? Cache or memory?
more ▼

asked Dec 08 '11 at 01:39 PM in Default

BI new gravatar image

BI new
66 4 6 7

(comments are locked)
10|1200 characters needed characters left

1 answer: sort oldest

To create a calculated member that is available throughout a Multidimensional Expressions (MDX) session, you use the CREATE MEMBER statement. A calculated member that is created by using the CREATE MEMBER statement will not be removed until after the MDX session closes OR DROP explicitly before the session closes. Whereas, If a calculated member is only required for a single Multidimensional Expressions (MDX) query, you can define that calculated member by using the WITH keyword. A calculated member that is created by using the WITH keyword no longer exists after the query has finished running. Member created through both statements will reside in memory. So yes, it can easily be said that the difference is only the scope. Hope it clears your ambiguity.

more ▼

answered Dec 09 '11 at 03:34 AM

Usman Butt gravatar image

Usman Butt
13.9k 6 8 14

Thanks for your answer
Dec 09 '11 at 07:22 AM BI new
(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



Answers and Comments

SQL Server Central

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



asked: Dec 08 '11 at 01:39 PM

Seen: 423 times

Last Updated: Dec 08 '11 at 01:39 PM