小编Ros*_*oss的帖子

Reporting Services可用性SQL Server Express 2008 R2

我正在尝试将Reporting Services添加到我已安装的SQL Server Express 2008 R2版本中.我正在Windows Server 2008 R2标准版盒子上安装它.

我何时运行安装程序以添加额外功能未列出报告服务.

我已经安装(我认为)所有先决条件需要IIS,ASP等但无济于事.报告服务在我的功能列表中不可见.

有任何想法吗?

reporting-services sql-server-2008r2-express

12
推荐指数
1
解决办法
2万
查看次数

Sql查询需要包含银行假日

我有以下查询:

set language 'english'

DECLARE @MyDate DATETIME

SET @MyDate = dateadd(dd,-1,dateadd(mm,datediff(mm,0,getdate()),0))

SELECT ReportEndDate = DATEADD(dd, CASE 
        WHEN DATENAME(weekday,@MyDate) = 'Saturday' THEN 5 
        WHEN DATENAME(weekday,@MyDate) IN ('Monday','Sunday') THEN 4 
        ELSE 6 END, @MyDate)
Run Code Online (Sandbox Code Playgroud)

您可以看到哪个月结束了+ 4个工作日.

我需要将其扩展到包括圣诞节和新年.因此,在新月的第4个工作日工作时,上述查询会考虑这些银行假日.

任何指针都会被贬低.

sql t-sql

3
推荐指数
1
解决办法
378
查看次数

为属性分配随机枚举值

嗨,我被赋予了一项我正在努力的任务.我需要为enum一个属性分配一个随机数.我的代码就是这个.

public enum PegColour
{
    Red, Green, Blue, Yellow, Black, White
}
Run Code Online (Sandbox Code Playgroud)

和其他看起来像这样的课程

public class PegContainer
{
   /// <summary>
   /// Dfines the colour of the first peg
   /// </summary>
    public Peg Colour1 { get; set; }

    /// <summary>
    /// Dfines the colour of the secod peg
    /// </summary>
    public Peg Colour2 { get; set; }

    /// <summary>
    /// Dfines the colour of the third peg
    /// </summary>
    public Peg Colour3 { get; set; }

    /// <summary>
    /// Dfines …
Run Code Online (Sandbox Code Playgroud)

c# enums

3
推荐指数
1
解决办法
157
查看次数

在ForEach语句中使用linq

我正在尝试使用Linq和我的ForEach语句来显示组中的输出.

我的代码看起来像这样:

Rooms.ToList()
     .ForEach(room => room.RoomContents.ToList()
         .ForEach(roomContents => roomContents.SupportedCommands.ToList()
             .ForEach(command => Console.Write("\nThe commands for {0} are: {1} ", roomContents.Name, command))));          

Console.ReadLine();
Run Code Online (Sandbox Code Playgroud)

电流输出:

The command for Tap are Use
The command for Key are Drop
The command for Key are Get
The command for Key are Use
The command for Bucket are Drop
The command for Bucket are Get
The command for Bucket are Use
Run Code Online (Sandbox Code Playgroud)

我的目标是以更友好的方式显示输出,即根据房间内容对命令进行分组.我希望输出显示这样的东西.

期望的输出:

The commands for Tap 
Use
The commands for Key 
Drop
Get
Use …
Run Code Online (Sandbox Code Playgroud)

c# linq

1
推荐指数
1
解决办法
71
查看次数