【发布时间】:2018-04-12 02:04:15
【问题描述】:
我的代码如下:
con.Open();
OracleCommand cmd = CreateCommand();
cmd.Connection = con;
cmd.CommandText = $"SELECT SUM(ATAN((CASE WHEN (t0.CustomerID = 'Test') THEN 1 ELSE 1 END))) value FROM Customers t0 WHERE(t0.CustomerID = 'Test')";
cmd.CommandType = CommandType.Text;
var reader = cmd.ExecuteReader();
while (reader.Read())
{
decimal value = reader.GetDecimal(0);
}
我得到的错误 - “指定的演员表无效”
有人可以帮我吗? 提前致谢。 俊
【问题讨论】:
-
给我们样本数据来处理
-
我遇到了大小写错误:十进制值 = reader.GetDecimal(0);