我正在尝试在下面的查询中创建一个简单的索引视图。但是当我尝试在其上创建唯一的聚集索引时,出现以下错误:
无法在视图“..”上创建聚集索引“..”,因为视图的选择列表包含关于聚合函数或分组列的结果的表达式。考虑从选择列表中删除聚合函数或分组列结果的表达式。
我使用的查询如下:
SELECT
[Manufacturer]
,ISNULL(SUM([QAV]),0) as AvgQAV
,ISNULL(SUM([BackOrders$]),0)as AvgBackorder$
,DATEPART(year,[Date])as Year
,DATEPART(month,[Date])as Month
,[fixSBU]
,[DC Name]
FROM [dbo].[TABLE1]
Group By
[Manufacturer]
,DATEPART(year,[Date])
,DATEPART(month,[Date])
,[fixSBU]
,[DC Name]
Run Code Online (Sandbox Code Playgroud)
谁能告诉我这可能的原因?如您所见,我已经在使用该ISNULL功能。
我试图用Visual Basic 2010中的脚本组件执行SSIS包。执行包时出现以下错误:

public void Main()
{
// TODO: Custom Code starts here
/*
* Description: Reads the input CMI Stats files and converts into a more readable format
* This Code for Better CMI Parser is converted as per SC's original code by S.A. on 3/6/2014
* Here is the description from original procedure
* CustType = DOMESTIC/INTERNATIONAL/ETC
* CategoryType = SBU/MAN
* Category = Actual value (AI/CC/etc)
* DataType = INCOMING or SHIP (or something else later?)
* …Run Code Online (Sandbox Code Playgroud)