2
我用下面的代码来执行在C#中的查询:查询OLAP服务器
AdomdConnection con = new AdomdConnection("Datasource=local;...");
con.Open();
AdomdCommand command = con.CreateCommand();
command.CommandText = input;
AdomdDataReader reader = command.ExecuteReader();
while (reader.Read())
{
for(i =0; i<reader.fieldCount; i++){
a[i]=reader.GetString(i);
}
return a;
Howeever,该代码在每个单元的层次结构返回的完整路径。即,每行数据都像[AllGeography,Canada,Vancouver,Allproduct,bike,accessories,297483]。 我想只检索叶子和度量值:[vancouver,accessories,297483]。我该怎么办?我如何指定叶子?