SQL SERVER SSAS:如何在我的事实表中处理NULL日期值,以便我可以无误地处理我的时间维度?(SQL SERVER SSAS: How do I handle a NULL date va

编程入门 行业动态 更新时间:2024-10-28 09:17:11
SQL SERVER SSAS:如何在我的事实表中处理NULL日期值,以便我可以无误地处理我的时间维度?(SQL SERVER SSAS: How do I handle a NULL date value in my fact table, so I can process my time dimension without errors?)

我有一个事实表,它有一个从MS Access源加载日期的列。 事情是,有些值是NULL,SSAS不会让我引用我的DATE维度。

在SSIS阶段解决它更好还是SSAS有解决方案?

非常感谢您的帮助。

I have a fact table that has a column with dates loaded from an MS Access source. The thing is, some of the values are NULL and the SSAS won't let me refer my DATE dimension to it.

Is it better to solve it at the SSIS stage or is there some solution at the SSAS?

Thank you very much for you help.

最满意答案

最佳做法是在Fact表中不要有任何NULL键(即Dimension键)值。

相反,在Date维度表(或“UnknownValue”,例如-1)中创建一个MAX日期,并键入该日期。

Best practice is not to have any NULL key (i.e. Dimension key) values in a Fact table.

Instead, create a MAX date in the Date dimension table (or an 'UnknownValue', -1 for instance) and key to that.

更多推荐

本文发布于:2023-07-14 20:23:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1107175.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:维度   事实   日期   时间   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!