dbTalk Databases Forums  

Week dimension

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


Discuss Week dimension in the microsoft.public.sqlserver.olap forum.



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

Default Week dimension - 08-16-2005 , 09:06 AM






Hi

I have some problems with the week level of the time dimension. I´m located
in denmark and therefore we use the ISO 8601 standards fore week numbering.

When I create a standard week level i get an error because DATEPART and
DATENAME functions return different results for the same date.

fx select datepart(week, '28-12-2003'), datename(week, '28-12-2003')
returns 52 and 53

This result in an error processing the cube. No problem I just use the
datepart function as both key and name. This solves the problem but now i
have the problem with wrong week-numbers acording to the ISO 8601 standard.

fx select datepart(week, '29-12-2003') returns 53 but the correct week
number is 1.

Is there any way to solve this problem using standard time dimension or do I
have to create a table with the correct weeknumber per date??

Any comment is appreciated.

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.