dbTalk Databases Forums  

UnknownMember behavior

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


Discuss UnknownMember behavior in the microsoft.public.sqlserver.olap forum.



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

Default UnknownMember behavior - 07-18-2007 , 01:58 AM






When we define user hierarchy, Unknown Member may have regular member under
it if attribute hierarchy
is processed with NullProcessing property to "UnknownMember".

For example,

A
Quote:
-- A1
-- A11
-- A12
-- A2
-- A21
-- A22
-- Unknown
-- Unknown
|-- Unknown
-- M1 (Regular Member)

Here, we can refer to Unknown Member variously using UnkownMember as
following,

[A].UnknownMember

[A].UnknownMember.UnknownMember

[A].UnknownMember.UnknownMember.UnknownMember

[A].UnknownMember.Children

However, next does not work. It causes parsing error.

[A].UnknownMember.[M1]

But if you set UnknownMemberName (for example, to Etc) and use it, next
work.

[A].[Etc].[M1]

Is it by design or bug?


Ohjoo




Reply With Quote
  #2  
Old   
Dave Balsillie
 
Posts: n/a

Default Re: UnknownMember behavior - 04-11-2011 , 01:52 PM






Actually both.

When you use the UnknownMember capability, under the covers it's generating a key like this:
.UNKNOWNMEMBER

That can lead to keys like (in your example):
.&[A].UNKNOWNMEMBER.&[M1].

Parts of the syntax engine haven't been coded with this senario and will return an error (incorrectly). However, the query engine seems to be able to return the values fine.

In the case you outlined, I suspect what's happening is you're passing the values WITHOUT the ampersand (&), and so the engine is doing a name lookup (instead of a key lookup). This passes the syntax engine and is executed.

NB: Name lookups are of course inherently slower. On a small dimension it's not very significant but on larger dimensions (i.e. +10,000 entries) it starts to bog down.

P.S. I contacted Microsoft a few years ago on this issue and they claimed it's "by design". Since it's perfectly good syntax (the engine just doesn't recognize the reserved keyword properly), you be the judge.

Quote:
On Wednesday, July 18, 2007 2:58 AM Ohjoo Kwon wrote:

When we define user hierarchy, Unknown Member may have regular member under
it if attribute hierarchy
is processed with NullProcessing property to "UnknownMember".

For example,

A
|-- A11
|-- A12
|-- A21
|-- A22
|-- Unknown
| |-- Unknown
|-- M1 (Regular Member)


Here, we can refer to Unknown Member variously using UnkownMember as
following,

[A].UnknownMember

[A].UnknownMember.UnknownMember

[A].UnknownMember.UnknownMember.UnknownMember

[A].UnknownMember.Children

However, next does not work. It causes parsing error.

[A].UnknownMember.[M1]

But if you set UnknownMemberName (for example, to Etc) and use it, next
work.

[A].[Etc].[M1]

Is it by design or bug?


Ohjoo

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.