Norkevicius

November 18, 2008

MDX complement operator problem

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]

September 12, 2008

anonymous, dynamic, variable classes and methods

Filed under: Side Notes, php — Tags: — aurimas.norkevicius @ 2:53 pm

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();

July 24, 2008

C# .NET project fails to compile because of System.Data.SqlClient SortOrder data type.

Filed under: C#.NET, Side Notes — aurimas.norkevicius @ 1:29 pm

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.

Older Posts »

Powered by WordPress