We are using member properties in Analysis Service for various purposes.
From 2005 onwards its providing typed flag as extension to member properties.
If typed is not used member property will be returned as string and will be converted if implicit convesion is possible else we have to use function to convert it to proper data type
If typed flag is passed then value will be converted to data type of property.
lets look at the sample for this
without type flag
with member [Measures].[Max Promotions] as
[Promotion].[Promotion].CurrentMember.Properties ("Max Quantity")+"a"
select [Measures].[Max Promotions] on 0,
[Promotion].[Promotion].members on 1
FROM [Adventure Works]
Max quantity data type returned as String and we can concate "a" with it
with typed flag
with member [Measures].[Max Promotions] as
[Promotion].[Promotion].CurrentMember.Properties ("Max Quantity",typed)+"a"
select [Measures].[Max Promotions] on 0,
[Promotion].[Promotion].members on 1
FROM [Adventure Works]
Now its giving error , because Max quantity data type INT is returned and we can not concate "a" with it.
From 2005 onwards its providing typed flag as extension to member properties.
If typed is not used member property will be returned as string and will be converted if implicit convesion is possible else we have to use function to convert it to proper data type
If typed flag is passed then value will be converted to data type of property.
lets look at the sample for this
without type flag
with member [Measures].[Max Promotions] as
[Promotion].[Promotion].CurrentMember.Properties ("Max Quantity")+"a"
select [Measures].[Max Promotions] on 0,
[Promotion].[Promotion].members on 1
FROM [Adventure Works]
Max quantity data type returned as String and we can concate "a" with it
with typed flag
with member [Measures].[Max Promotions] as
[Promotion].[Promotion].CurrentMember.Properties ("Max Quantity",typed)+"a"
select [Measures].[Max Promotions] on 0,
[Promotion].[Promotion].members on 1
FROM [Adventure Works]
Now its giving error , because Max quantity data type INT is returned and we can not concate "a" with it.
No comments:
Post a Comment