Quantcast
Channel: THWACK: Popular Discussions - Orion SDK
Viewing all articles
Browse latest Browse all 3719

Pulling information on newest traps from Orion.Traps

$
0
0

I'm a bit perplexed.  I want to pull the number of traps received in the past 10 minutes.  When I do it using SQL:

 

SELECT COUNT(TrapID) AS MYCOUNT

FROM [dbo].[Traps]

WHERE [dbo].[Traps].[DateTime] > DateAdd(minute, -10, GetDate())

 

I get:  MYCOUNT = 5224

 

When I do it using SWQL in SWQL Studio 2.1.13.0:

 

SELECT COUNT(TrapID) AS MYCOUNT

FROM Orion.Traps

WHERE DateTime > AddMinute(-10, GetDate())

 

I get:  MYCOUNT = 269749

 

Given our volume of trap traffic, I wasn't expecting an exact match, but I was expecting the values to be within 10 or so.

 

What am I doing wrong?

 

C.


Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>