Home      Functions     Common Solutions      Contact     

MDX Functions:
MDX Functions

Common Solutions

Common Solutions
Resource Links

MDX Books
MDX Related Software
MDX Related Blogs
Other Links

Contact Us
Microsoft SQL Server Analysis Services Function Page
Function Name: SetToArray
Category: Other
Description: The SetToArray function converts a set to an array so it can be used in a user defined funtion.
Syntax: SETTOARRAY( «Set»[, «Set»...][, «Numeric Expression»] )
Technet Link: MDX SetToArray Function

Since the SetToArray returns a variant, we do not have a working query example for SQL Server Management Studio. However, the simulated query below would pass an array to a UDF.

      MY_UDF(SETTOARRAY({[Sales Reason].[Sales Reasons].[Sales Reason].Members}, [Measures].[Sales Amount])) ON COLUMNS
      [Adventure Works]
If you run the above query in SQL Server Management Studio, you will receive the following error: Executing the query ... Query (1, 8) The '[MY_UDF]' function does not exist. Execution complete


Copyright 2008 by MDXpert.com.
Terms of Use                              Privacy Statement
Site Powered By - WinHost.Com