Quantcast
Channel: Microsoft Dynamics RMS Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4248

Worksheet Status numbers in SQL database!

$
0
0

Hi, I am trying to make couple of query that pulls the data if there are Red Flag or HQ Client is not connected to the server for certain period of time. All my stores are connect to server every hours. So if HQ Client is turned off and passed the connection time, it will how Blue Flag with a exclamation mark.

My idea is to using SQL Server Agent Job to run every hour to pull data from Worksheet that has the RED FLAG worksheet and pull data that has the Blue Flag with a exclamation mark.

So I come up with a query here and it is not really what I am looking for.

SELECT * FROM Worksheet WHERE EffectiveDate > DateAdd(hh,-5,GetDate()) AND Style=401 AND Status=2

I thought this will pull only worksheet that has not been processed for 5 hours ago... but Status 2 not the one with exclamation mark. 

SELECT * FROM Worksheet WHERE Status=5

This will pull that has red flag.

Can anyone help me finding correct flag? or the numbers?


Viewing all articles
Browse latest Browse all 4248

Trending Articles



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