"Kch th?c '<named set="" alias="">' khng ?c t?m th?y trong cc kh?i khi chu?i, <named set="" alias="">, ?c phn tch c php" l?i khi b?n th?c ...

D?ch tiu ? D?ch tiu ?
ID c?a bi: 2739928 - Xem s?n ph?m m bi ny p d?ng vo.
Bung t?t c? | Thu g?n t?t c?

? Trang ny

Tri?u ch?ng

Khi b?n c? g?ng ? ch?y m?t truy v?n a chi?u bi?u th?c (MDX) trong Microsoft SQL Server 2012 phn tch b?n ghi d?ch v? (SSAS), b?n c th? nh?n ?c m?t thng bo l?i tng t? nh sau y:
Kch th?c '<named set="" alias=""></named>' khng ?c t?m th?y trong cc kh?i khi chu?i, <named set="" alias=""> </named>, ?c phn tch c php.

Ghi ch
  • "Tn ?t b danh"l m?t gi? ch? cho tn nng ?ng m b?n ? xc ?nh cho kch th?c.
  • MDX truy v?n ?c th?c hi?n thnh cng trong SSAS 2008 R2.

V d ?, b?n nh?n ?c thng bo l?i khi b?n th?c hi?n truy v?n sau y ?i v?i b? my c s? d? li?u AdventureWorks SQL Server 2008 R2 vo nm 2012 SSAS:
WITH 
SET XQE_NS10 AS
Filter
(
[Product].[Product Categories].[Category].MEMBERS
,
Count
(
Filter
(
CrossJoin
(
[Product].[Product Categories].[Category].MEMBERS
,[Product].[Status].[Status].MEMBERS
)
,
(
[Measures].[Reseller Freight Cost]
,[Date].[Fiscal].[XQE_MDF_CM0]
)
> 20000
)
,IncludeEmpty
)
> 0
)


/* The named set [XQE_SA0] is defined in context of the COUNT operation */

MEMBER [Date].[Fiscal].[XQE_MDF_CM0] AS
IIF
(
Count
(
Descendants
(
[Geography].[Geography].CurrentMember
,[Geography].[Geography].[Country]
) AS [XQE_SA0]
,IncludeEmpty
)
> 0
,Aggregate

/* [XQE_SA0] is subsequently used in AGGREGATE */
(
[XQE_SA0]
,[Date].[Fiscal].DefaultMember
)
,NULL
)
SET XQE_NS0 AS
[Geography].[Geography].[Country].&[Canada]
SELECT
{XQE_NS0} ON 0
FROM [AdventureWorks]
WHERE
[Measures].[Reseller Freight Cost];

Nguyn nhn

V?n ? ny x?y ra v? m?t b danh ?c xc ?nh trong m?t ph?m vi c? th? khng th? ?c tham chi?u bn ngoi ph?m vi vo nm 2012 SSAS.

Lu ? R? r? ph?m vi ?c kch ho?t trong SSAS 2008 R2. Tuy nhin, n b? v hi?u ha vo nm 2012 SSAS.

T?nh tr?ng

Microsoft ? xc nh?n r?ng y l s? c? trong s?n ph?m c?a Microsoft ?c li?t k trong ph?n "p d?ng cho".

Cch gi?i quy?t khc

? lm vi?c xung quanh v?n ? ny, s? d?ng m?t trong nh?ng phng php sau y ? trnh tham kh?o m?t b danh l bn ngoi ph?m vi c?a n ?c xc ?nh trong m?t truy v?n MDX vo nm 2012 SSAS.

Phng php 1

Tham kh?o b danh trong ph?m vi c?a n ?c xc ?nh.

Phng php 2

S? d?ng m?t bi?u th?c MDX trng l?p m ?i di?n cho b danh. V d ?, ? lm vi?c xung quanh v?n ? trong t?nh hu?ng ?c m t? trong ph?n "Tri?u ch?ng", b?n c th? thay th? b danh [XQE_SA0] v?i cc bi?u hi?n sau:
([Geography].[Geography].CurrentMember,[Geography].[Geography].[Country])
By gi?, m? sau s? ch?y thnh cng:
WITH 
SET XQE_NS10 AS
Filter
(
[Product].[Product Categories].[Category].MEMBERS
,
Count
(
Filter
(
CrossJoin
(
[Product].[Product Categories].[Category].MEMBERS
,[Product].[Status].[Status].MEMBERS
)
,
(
[Measures].[Reseller Freight Cost]
,[Date].[Fiscal].[XQE_MDF_CM0]
)
> 20000
)
,IncludeEmpty
)
> 0
)
MEMBER [Date].[Fiscal].[XQE_MDF_CM0] AS
IIF
(
Count
(
Descendants
(
[Geography].[Geography].CurrentMember
,[Geography].[Geography].[Country]
) AS [XQE_SA0]
,IncludeEmpty
)
> 0
,Aggregate
(
Descendants
/* instead of referencing [XQE_SA0], substitute the MDX upon which it is based */
(
[Geography].[Geography].CurrentMember
,[Geography].[Geography].[Country]
)
,[Date].[Fiscal].DefaultMember
)
,NULL
)
SET XQE_NS0 AS
[Geography].[Geography].[Country].&[Canada]
SELECT
{XQE_NS0} ON 0
FROM [AdventureWorks]
WHERE
[Measures].[Reseller Freight Cost];

Tham kh?o

? bi?t thm v? b? my c s? d? li?u AdventureWorks cho SQL Server 2008 R2, h?y i ?n website sau c?a Microsoft CodePlex:
Microsoft SQL Server s?n ph?m m?u

Thu?c tnh

ID c?a bi: 2739928 - L?n xem xt sau cng: 25 Thang Chin 2012 - Xem xt l?i: 1.0
p d?ng
  • Microsoft SQL Server 2012 Developer
  • Microsoft SQL Server 2012 Enterprise
  • Microsoft SQL Server 2012 Standard
  • Microsoft SQL Server 2012 Business Intelligence
  • Microsoft SQL Server 2012 Web
T? kha:
kbsurveynew kbtshoot kbexpertiseadvanced kbmt KB2739928 KbMtvi
My d?ch
QUAN TRONG: Bi vi?t ny ?c d?ch b?ng ph?n m?m d?ch my c?a Microsoft ch? khng ph?i do con ng?i d?ch. Microsoft cung c?p cc bi vi?t do con ng?i d?ch v c? cc bi vi?t do my d?ch ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng ngn ng? c?a b?n. Tuy nhin, bi vi?t do my d?ch khng ph?i lc no c?ng hon h?o. Lo?i bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, gi?ng nh m?t ng?i n?c ngoi c th? m?c sai st khi ni ngn ng? c?a b?n. Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra. Microsoft c?ng th?ng xuyn c?p nh?t ph?n m?m d?ch my ny.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny: 2739928

Cung cp Phan hi

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com