Skip to content
Permalink
Browse files

Fixing issue with not converting to money

  • Loading branch information
tarynpratt committed Mar 18, 2020
1 parent c1bdafb commit a858d9b780da9f1fc2945ef89b053d9cc007c9a1
Showing with 4 additions and 4 deletions.
  1. +4 −4 Opserver.Core/Data/SQL/SQLInstance.PerfCounters.cs
@@ -69,14 +69,14 @@ public class PerfCounterRecord : ISQLVersioned
cc.counter_name CounterName,
cc.instance_name InstanceName,
cc.cntr_value CurrentValue,
(Case cc.cntr_type
CAST((Case cc.cntr_type
When 65792 Then cc.cntr_value -- Count
When 537003264 Then IsNull(Cast(cc.cntr_value as Money) / NullIf(cbc.cntr_value, 0), 0) -- Ratio
When 537003264 Then IsNull(cc.cntr_value * 1.0 / NullIf(cbc.cntr_value, 0), 0) -- Ratio
When 272696576 Then cc.cntr_value - pc.cntr_value -- Per Second
When 1073874176 Then IsNull(Cast(cc.cntr_value - pc.cntr_value as Money) / NullIf(cbc.cntr_value - pbc.cntr_value, 0), 0) -- Avg
When 1073874176 Then IsNull((cc.cntr_value - pc.cntr_value) * 1.0 / NullIf(cbc.cntr_value - pbc.cntr_value, 0), 0) -- Avg
When 1073939712 Then cc.cntr_value - pc.cntr_value -- Base
Else cc.cntr_value
End) CalculatedValue,
End) as decimal(25,2)) CalculatedValue,
cc.cntr_type Type
From @CCounters cc
Left Join @CCounters cbc

0 comments on commit a858d9b

Please sign in to comment.
You can’t perform that action at this time.