Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
All I'm trying to do is iterate thru two months of data and collecting the number of patient exams that are due by the date in question. The actual date ('09/12/2011') is the only value that is dynamically inputted at run-time.
SELECT CONVERT(varchar(10), DATEADD(D, [Number], '09/12/2011'), 101) As [TheDate], (SELECT COUNT([PatientID]) FROM [Patients] WHERE [NextExam] <= DATEADD(D, [Number], '09/12/2011')) AS [NextCount], (SELECT COUNT([PatientID]) FROM [Patients] WHERE [POEExam] <= DATEADD(D, [Number], '09/12/2011')) AS [POECount] FROM [Numbers] WHERE [Number] < DATEDIFF(D, '09/12/2011', DATEADD(M, 2, '09/12/2011')) ORDER BY [TheDate];
Join the community of 500,000 technology professionals and ask your questions.