From 93f5b8cc4aaad22e8c2195a24c97884e5a5e5787 Mon Sep 17 00:00:00 2001 From: zensqlmonitor Date: Sat, 23 Apr 2016 09:14:04 +0200 Subject: [PATCH] Fix datatype conversion --- plugins/inputs/sqlserver/sqlserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inputs/sqlserver/sqlserver.go b/plugins/inputs/sqlserver/sqlserver.go index 58d61705f..f91e66c24 100644 --- a/plugins/inputs/sqlserver/sqlserver.go +++ b/plugins/inputs/sqlserver/sqlserver.go @@ -1052,7 +1052,7 @@ SELECT When 1073874176 Then IsNull(Cast(cc.cntr_value - pc.cntr_value as Money) / NullIf(cbc.cntr_value - pbc.cntr_value, 0), 0) -- Avg When 272696320 Then IsNull(Cast(cc.cntr_value - pc.cntr_value as Money) / NullIf(cbc.cntr_value - pbc.cntr_value, 0), 0) -- Avg/sec When 1073939712 Then cc.cntr_value - pc.cntr_value -- Base - Else cc.cntr_value End as int) + Else cc.cntr_value End as bigint) --, currentvalue= CAST(cc.cntr_value as bigint) FROM #CCounters cc INNER JOIN #PCounters pc On cc.object_name = pc.object_name