浏览代码

Dashboard - Invalid column name 'id'. (#413)

System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'id'.
master
edelibas 5 年前
committed by Savorboard
父节点
当前提交
275b5b5ed1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      src/DotNetCore.CAP.SqlServer/IMonitoringApi.SqlServer.cs

+ 2
- 2
src/DotNetCore.CAP.SqlServer/IMonitoringApi.SqlServer.cs 查看文件

@@ -181,7 +181,7 @@ select [Key], [Count] from aggr with (nolock) where [Key] in @keys;";
var sqlQuery = $@"
with aggr as (
select FORMAT(Added,'yyyy-MM-dd-HH') as [Key],
count(id) [Count]
count(Id) [Count]
from [{_options.Schema}].{tableName}
where StatusName = @statusName
group by FORMAT(Added,'yyyy-MM-dd-HH')
@@ -211,4 +211,4 @@ select [Key], [Count] from aggr with (nolock) where [Key] in @keys;";
return result;
}
}
}
}

正在加载...
取消
保存