在冒险中工作这两种情况之间的区别是什么:
1)From Clause中的过滤器成员:
with
member [existing_categries_Member_Count]as
count(existing[Product].[Category].[Category].members)
member [existing_subcategries_Member_Count]as
count(existing[Product].[subCategory].[subCategory].members)
select
{
[existing_subcategries_Member_Count],
[existing_categries_Member_Count]
} on 0
FROM (
SELECT [Product].[Subcategory].&[31] ON 0
FROM [Adventure Works])
结果:
existing_subcategries_Member_Count existing_categries_Member_Count
37 4
和 2)过滤成员在WHERE子句中:
with
member [existing_categries_Member_Count]as
count(existing[Product].[Category].[Category].members)
member [existing_subcategries_Member_Count]as
count(existing[Product].[subCategory].[subCategory].members)
select
{
[existing_subcategries_Member_Count],
[existing_categries_Member_Count]
} on 0
FROM [Adventure Works]
WHERE [Product].[Subcategory].&[31]
结果:
existing_subcategries_Member_Count existing_categries_Member_Count
1 1
我希望两个查询的结果相同,但我看到了不同的结果。 请告诉我WHERE和SUbcube之间的区别 感谢