我已经构建了一个Analysis Services并应用了Bussness Intelligent Development Studio的数据挖掘。现在我有一个预测查询如下:
SELECT
PredictAssociation([Association].[v User Subscribe Product], INCLUDE_STATISTICS, 3)
From
[Association]
NATURAL PREDICTION JOIN
(SELECT (SELECT 'Ipad 1' AS [Product Name]
UNION SELECT 'Ipad 2' AS [Product Name]
UNION SELECT 'Iphone 3GS' AS [Product Name]
UNION SELECT 'Iphone 5C' AS [Product Name]) AS [v User Subscribe Product]) AS t
我在SQL Management Studio中的结果视图如下:
我使用ADOMD.NET在我的应用程序上获取READER show。我的代码如下:
var command = new AdomdCommand(DMXQuery, SqlConnectionHelper.GetConnectionSSAS());
var reader = command.ExecuteReader();
每件事情都会好起来的。读者执行仍然可以。但我不知道如何准确地获得“产品名称”。读者包括它,但我不知道如何获得。
有人知道吗?
请求提前。
答案 0 :(得分:0)
while (reader.Read())
{
Console.Write(reader[0]); // Your product name
// Other fields
for (int i = 1; i < reader.FieldCount; i++)
{
Console.Write(reader[i] + " ");
}
Console.WriteLine();
}
reader.Close();