Playing with Microsoft SQL Server Analysis services 2005 and MDX language. Could not find many resources or error reference on the internet.
The following MDX query was created using query painter:
Select (-({[My Dimension].[My Hierarchy].[My Level].&[Not existing member]})) ON COLUMNS FROM [My Cube]
Executing this query results in an error:
Set used with the complement operator must have all members from the same level.
Workaround is to use EXCEPT function instead of “-” operator like this:
Select ({EXCEPT([My Dimension].[My Hierarchy].[My Level],[My Dimension].[My Hierarchy].[My Level].&[Not existing member])}) ON COLUMNS FROM [My Cube]
To call a method by dynamic name you can do this:
$methodName="MyMethod";
$result=$methodName();
To create a class by dynamic name you can do this:
$className="MyClass";
$classVar=new $className;
To call any method by dynamic name in previously initialized class you can do this:
$methodName="MyMethod";
$result=$classVar->$methodName();
Had a headache because of compilation of project which was using System.Data.SqlClient SortOrder data type. After some hours of investigations we found out that Microsoft .NET framework 2.0 SP1 was not installed on the machine. .NET 2.0 contains system.Data.SqlClient namespace but not SortOrder type in it. SP1 adds this data type to the namespace mentioned above.
Check this on microsoft.