dbTalk Databases Forums  

Default Member on Time Dimension - Bug??

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


Discuss Default Member on Time Dimension - Bug?? in the microsoft.public.sqlserver.olap forum.



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

Default Default Member on Time Dimension - Bug?? - 12-18-2006 , 03:56 PM






Hi

We have set a default member on our time dimension using the following
script. The idea is to set the default member to the current day

STRTOMEMBER
(
"[Time].[PK Date].&["+ cstr(Year(NOW()))
+"-"+ iif(len(cstr(Month(Now()))) = 1, "0" + cstr(Month(Now())) ,
cstr(Month(Now())))
+ "-" + iif(len(cstr(Day(Now()))) = 1, "0" + cstr(Day(Now())) ,
cstr(Day(Now())))
+ "T00:00:00]")


This appears to works fine. When I open SQL Management Studio and select
[Time].[PK Date].DefaultMember it returns the correct day.

However, when I try and access the the default member property via adomd.net
I get a completly different date (11 Jan 2006). I tried accessing the
default member property of the hierarchy in the object model as well as
using MDX and executeCellset(). Both return incorrect data.

Can someone confirm that this is a bug or am I missing something? If it is a
bug, has anyone come up with a workaround?

I am running SSAS 2005 Dev SP1 on WinXP dev box.

Cheers



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.