SELECT COUNT(*) AS cont FROM Image where datediff(hh,CheckDateTime,GETDATE())<=1
SELECT COUNT(*) AS cont FROM Image where datediff(hh,CheckDateTime,GETDATE())<=6
QR回寫失敗
SELECT count(*) AS cont FROM StudyInfo where ArchiveFlag=-1
QR連接異常
Select count(*) AS cont FROM dbo.StudyInfo where ArchiveFlag=0
LM_StudyMonitor(監(jiān)控庫(kù))
前天圖像是否漏傳
SELECT count(*) AS cont FROM StudyCount WHERE LogDatetime>=getdate()-1 AND RISNumber > FTDocNumber(只查找有沒(méi)有漏傳的)
SELECT isnull(RISNumber,0)-isnull(FTDocNumber,0) AS cont FROM StudyCount WHERE LogDatetime>=getdate()-1(可以計(jì)算漏傳多少)
SELECT (case when isnull(PACSNumber,0)-isnull(RISNumber,0) <0 then 0 else isnull(PACSNumber,0)-isnull(RISNumber,0) end)AS cont FROM StudyCount WHERE LogDatetime>=getdate()-1(相減得負(fù)的值值為零)
DocRouter(正式庫(kù))
數(shù)據(jù)未上傳
Select count(*) FROM Docimage where [30011041]=3 and datediff(dd,[00080020],getdate())<1
1/6個(gè)小時(shí)沒(méi)有進(jìn)數(shù)據(jù)
SELECT COUNT(*) AS cont FROM StudyInfo where datediff(hh,CreateTime,GETDATE())<=6
SELECT COUNT(*) AS cont FROM StudyInfo where datediff(hh,CreateTime,GETDATE())<=1
Oracle語(yǔ)法:
查詢15分鐘內(nèi)的數(shù)據(jù)
select COUNT(*) AS cont from V_DocReport
where ReportDatetime >= SYSDATE-numtodsinterval(15,'minute')
Mysql語(yǔ)法:
查詢15分鐘內(nèi)的數(shù)據(jù)
SELECT COUNT(*) AS cont from V_DocReport where now() < SUBDATE(ReportDatetime,interval -15 minute)