从哪里获取 SSAS Labs 的 vDateFeed 视图定义?

发布于 2024-12-23 18:21:39 字数 175 浏览 0 评论 0原文

我已经下载并安装了 Adventure Works 数据库,以便与 SSAS 实验室和视频一起使用。

然而,它们似乎都使用了一个名为 vDateFeed 的视图,该视图在数据源和设置文件中不存在。这样基本上就结束了教程的使用。似乎没有地方可以下载此视图定义。

有人有吗?如果有的话,可以将其发布到这里吗?

I have download and installed the Adventure Works database to use with the SSAS labs and videos.

However they all seem to make use of a view called vDateFeed that is non existent in the datasource and setup files. So that basically puts an end to using the tutorials. There doesn't seem to be anywhere to download this view definition.

Does anyone have it and if so can you please post it here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

怎会甘心 2024-12-30 18:21:39

我刚刚进入虚拟实验室。如果你想要快捷方式,视图定义为

CREATE VIEW [dbo].[vDateFeed]
AS
    SELECT
        [DateKey],
        [FullDateAlternateKey] AS [Date],
        CAST([CalendarYear] AS NCHAR(4)) + N' ' + LEFT([EnglishMonthName], 3) + N', ' + CASE WHEN [DayNumberOfMonth] < 10 THEN N'0' ELSE N'' END + CAST([DayNumberOfMonth] AS NVARCHAR(2)) AS [DateLabel],
        (([CalendarYear] * 100) + [MonthNumberOfYear]) AS [MonthKey],
        CAST([CalendarYear] AS NCHAR(4)) + N' ' + LEFT([EnglishMonthName], 3) AS [MonthLabel],
        [MonthNumberOfYear] AS [MonthOfYearKey],
        LEFT([EnglishMonthName], 3) AS [MonthOfYearLabel],
        (([CalendarYear] * 10) + [CalendarQuarter]) AS [CalendarQuarterKey],
        N'CY' + CAST([CalendarYear] AS NCHAR(4)) + N' Q' + CAST([CalendarQuarter] AS NCHAR(1)) AS [CalendarQuarterLabel],
        [CalendarQuarter] AS [CalendarQuarterOfYearKey],
        N'CY Q' + CAST([CalendarQuarter] AS NCHAR(1)) AS [CalendarQuarterOfYearLabel],
        [CalendarYear] AS [CalendarYearKey],
        N'CY' + CAST([CalendarYear] AS NCHAR(4)) AS [CalendarYearLabel]
    FROM
        [dbo].[DimDate];
GO

I just went into the virtual lab. If you want a shortcut, the view is defined as

CREATE VIEW [dbo].[vDateFeed]
AS
    SELECT
        [DateKey],
        [FullDateAlternateKey] AS [Date],
        CAST([CalendarYear] AS NCHAR(4)) + N' ' + LEFT([EnglishMonthName], 3) + N', ' + CASE WHEN [DayNumberOfMonth] < 10 THEN N'0' ELSE N'' END + CAST([DayNumberOfMonth] AS NVARCHAR(2)) AS [DateLabel],
        (([CalendarYear] * 100) + [MonthNumberOfYear]) AS [MonthKey],
        CAST([CalendarYear] AS NCHAR(4)) + N' ' + LEFT([EnglishMonthName], 3) AS [MonthLabel],
        [MonthNumberOfYear] AS [MonthOfYearKey],
        LEFT([EnglishMonthName], 3) AS [MonthOfYearLabel],
        (([CalendarYear] * 10) + [CalendarQuarter]) AS [CalendarQuarterKey],
        N'CY' + CAST([CalendarYear] AS NCHAR(4)) + N' Q' + CAST([CalendarQuarter] AS NCHAR(1)) AS [CalendarQuarterLabel],
        [CalendarQuarter] AS [CalendarQuarterOfYearKey],
        N'CY Q' + CAST([CalendarQuarter] AS NCHAR(1)) AS [CalendarQuarterOfYearLabel],
        [CalendarYear] AS [CalendarYearKey],
        N'CY' + CAST([CalendarYear] AS NCHAR(4)) AS [CalendarYearLabel]
    FROM
        [dbo].[DimDate];
GO
奈何桥上唱咆哮 2024-12-30 18:21:39

请安装面向开发人员培训工具包的 SQL Server 2008 R2 更新(2011 年 5 月更新) ,并尝试从此套件执行Setup_AdventureWorksDW2008R2.sql。该脚本有很多实例,其中之一位于以下文件夹中:{培训套件安装文件夹}\Demos\SQL10R2BYFBI00-DEMO-01\Source\Setup\scripts\Tasks\sql。该脚本包含创建 vDateFeed 的代码。

Please, install SQL Server 2008 R2 Update for Developers Training Kit (May 2011 Update), and try to execute Setup_AdventureWorksDW2008R2.sql from this kit. There are many instances of this script, one of them is in the following folder: {training kit installation folder}\Demos\SQL10R2BYFBI00-DEMO-01\Source\Setup\scripts\Tasks\sql. This script contains code to create vDateFeed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文