0
 SELECT 
 { [Measures].[Net] } ON COLUMNS
 , NON EMPTY 
 { ([Bill To].[Customer Name].[Customer Name].ALLMEMBERS 
 * [Bill To].[Account Type].[Account Type].ALLMEMBERS 
 * [Reporting Date].[Fiscal Period].[Fiscal Period].ALLMEMBERS ) } 
 DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME 
 ON ROWS 
 FROM ( SELECT ( STRTOSET(@EmployeeDimEmployeeManagerCode ) )  ON COLUMNS 
         FROM ( SELECT ( STRTOSET(@BillToDimCustAccountType ) ) ON COLUMNS 
         FROM ( SELECT ( STRTOSET(@GeneralLedgerDimGLBusinessUnit ) ) ON COLUMNS 
         FROM ( SELECT ( STRTOSET(@CompanyDimCompanyName ) ) ON COLUMNS 
         FROM ( SELECT ( STRTOMEMBER(@FromCalendarDateDimMonth ) : STRTOMEMBER(@FromCalendarDateDimMonth ).LAG(11) ) ON COLUMNS 
         FROM [Revenue])))))  WHERE ( IIF( STRTOSET(@CompanyDimCompanyName, CONSTRAINED).Count = 1
 , STRTOSET(@CompanyDimCompanyName, CONSTRAINED)
 , [Company].[Company].currentmember )
 , IIF( STRTOSET(@GeneralLedgerDimGLBusinessUnit, CONSTRAINED).Count = 1
 , STRTOSET(@GeneralLedgerDimGLBusinessUnit, CONSTRAINED)
 , [Product].[GL Business Unit].currentmember )
 , IIF( STRTOSET(@EmployeeDimEmployeeManagerCode, CONSTRAINED).Count = 1
 , STRTOSET(@EmployeeDimEmployeeManagerCode, CONSTRAINED)
 , [Order Primary Sales Assignment].[Order Primary Sales Assignment Manager Name].currentmember ) ) 
 CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE
 , FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS

我只是一个菜鸟 MDX 开发人员。在上面的查询(由其他人编写)中,我不理解“来自”部分。为什么我们将 strtoset 参数放在列中,我们从收入立方体中提取什么???

4

1 回答 1

0

此查询包含子选择;此功能用于过滤查询。

@EmployeeDimEmployeeManagerCode在执行查询之前,所有变量都将被替换。StrToSet函数用于降低注入攻击的风险。

于 2012-07-16T18:33:49.540 回答