dbTalk Databases Forums  

Retrieving User-Defined Member Properties using PROPERTIES keyword

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


Discuss Retrieving User-Defined Member Properties using PROPERTIES keyword in the microsoft.public.sqlserver.olap forum.



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

Default Retrieving User-Defined Member Properties using PROPERTIES keyword - 08-25-2006 , 10:31 AM






I am using an example from ‘SQL Server 2005 Books Online’, which explain how
to retrieve User-Defined Member Properties.

Using the PROPERTIES Keyword to Retrieve User-Defined Member Properties:

DIMENSION PROPERTIES [Dimension.]Level.<Custom_Member_Property>

The PROPERTIES keyword appears after the set expression of the axis
specification. For example, the following MDX query the PROPERTIES keyword
retrieves the List Price and Dealer Price user-defined member properties and
appears after the set expression that identifies the products sold in January:

SELECT
CROSSJOIN([Ship Date].[Calendar].[Calendar Year].Members,
[Measures].[Sales Amount]) ON COLUMNS,
NON EMPTY Product.Product.MEMBERS
DIMENSION PROPERTIES
Product.Product.[List Price],
Product.Product.[Dealer Price] ON ROWS
FROM [Adventure Works]
WHERE ([Date].[Month of Year].[January])


After running the above MDX query, I don’t see any[List Price] or [Dealer
Price] and the result is exactly like running the following MDX query:

SELECT
CROSSJOIN([Ship Date].[Calendar].[Calendar Year].Members,
[Measures].[Sales Amount]) ON COLUMNS,
NON EMPTY Product.Product.MEMBERS ON ROWS
FROM [Adventure Works]
WHERE ([Date].[Month of Year].[January])


How can I retrieve User-Defined Member Properties?

Thanks,

Yones

Reply With Quote
  #2  
Old   
yongli
 
Posts: n/a

Default RE: Retrieving User-Defined Member Properties using PROPERTIES keyword - 08-25-2006 , 04:51 PM






I guess the properties are not part of axis members for display, it is up to
the tool to interpret the MDX and retrieve the properties specifed and
display them.
You can define calculated member to display your propertis if you want.


"Yones" wrote:

Quote:
I am using an example from ‘SQL Server 2005 Books Online’, which explain how
to retrieve User-Defined Member Properties.

Using the PROPERTIES Keyword to Retrieve User-Defined Member Properties:

DIMENSION PROPERTIES [Dimension.]Level.<Custom_Member_Property

The PROPERTIES keyword appears after the set expression of the axis
specification. For example, the following MDX query the PROPERTIES keyword
retrieves the List Price and Dealer Price user-defined member properties and
appears after the set expression that identifies the products sold in January:

SELECT
CROSSJOIN([Ship Date].[Calendar].[Calendar Year].Members,
[Measures].[Sales Amount]) ON COLUMNS,
NON EMPTY Product.Product.MEMBERS
DIMENSION PROPERTIES
Product.Product.[List Price],
Product.Product.[Dealer Price] ON ROWS
FROM [Adventure Works]
WHERE ([Date].[Month of Year].[January])


After running the above MDX query, I don’t see any[List Price] or [Dealer
Price] and the result is exactly like running the following MDX query:

SELECT
CROSSJOIN([Ship Date].[Calendar].[Calendar Year].Members,
[Measures].[Sales Amount]) ON COLUMNS,
NON EMPTY Product.Product.MEMBERS ON ROWS
FROM [Adventure Works]
WHERE ([Date].[Month of Year].[January])


How can I retrieve User-Defined Member Properties?

Thanks,

Yones

Reply With Quote
  #3  
Old   
Yones
 
Posts: n/a

Default RE: Retrieving User-Defined Member Properties using PROPERTIES key - 08-28-2006 , 08:40 AM



Thank very much.
I found the problem, which is related to the way data is returned after
execution of an MDX query. It is returned differently in Analysis Services
2000 and 2005. For example using an XMLReader, elements names are returned as
follow:
AS 2000:
clXmlReader.Name: "List Price"
clXmlReader.value: "List Price value"
clXmlReader.Name: "Dealer Price"
clXmlReader.value: "Dealer Price value"

AS 2005:
clXmlReader.Name: "_x005B_ Product
_x005D_._x005B_Product_x005D_._x005B_Product_x005D _._x005B_ List Price
_x005D_"
clXmlReader.value: "List Price value"
clXmlReader.Name: "_x005B_ Product _x005D_._x005B_ Product _x005D_._x005B_
Product _x005D_._x005B_ Dealer Price _x005D_"
clXmlReader.value: "Dealer Price value"

Thanks again.




"yongli" wrote:

Quote:
I guess the properties are not part of axis members for display, it is up to
the tool to interpret the MDX and retrieve the properties specifed and
display them.
You can define calculated member to display your propertis if you want.


"Yones" wrote:

I am using an example from ‘SQL Server 2005 Books Online’, which explain how
to retrieve User-Defined Member Properties.

Using the PROPERTIES Keyword to Retrieve User-Defined Member Properties:

DIMENSION PROPERTIES [Dimension.]Level.<Custom_Member_Property

The PROPERTIES keyword appears after the set expression of the axis
specification. For example, the following MDX query the PROPERTIES keyword
retrieves the List Price and Dealer Price user-defined member properties and
appears after the set expression that identifies the products sold in January:

SELECT
CROSSJOIN([Ship Date].[Calendar].[Calendar Year].Members,
[Measures].[Sales Amount]) ON COLUMNS,
NON EMPTY Product.Product.MEMBERS
DIMENSION PROPERTIES
Product.Product.[List Price],
Product.Product.[Dealer Price] ON ROWS
FROM [Adventure Works]
WHERE ([Date].[Month of Year].[January])


After running the above MDX query, I don’t see any[List Price] or [Dealer
Price] and the result is exactly like running the following MDX query:

SELECT
CROSSJOIN([Ship Date].[Calendar].[Calendar Year].Members,
[Measures].[Sales Amount]) ON COLUMNS,
NON EMPTY Product.Product.MEMBERS ON ROWS
FROM [Adventure Works]
WHERE ([Date].[Month of Year].[January])


How can I retrieve User-Defined Member Properties?

Thanks,

Yones

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.