Stored Procedure Questions
Posted on 2007-09-28
Hey everyone, I have one question, and again I'm very sorry for my poor knowledge of this system, I know I've been opening numours cases but I'm very new to Experts-Exchange. Thank you very much Adraughn for your help getting me this far.
on MIN(ChangeDTTM) i'm looking to get the MIN in the PREVIOUS full month, so for example today is September 28, I'm looking to get the MIN from the full month of August. Does that make sence?
CREATE PROCEDURE dbo.rptMinimumAuditDiagnosticResultDTTMs
SELECT v.AuditEventType,v.InternalExamID, MIN(ChangeDTTM)
FROM vusrAuditDiagnosticReport v
WHERE (v.AuditEventType = 'DICTATE') OR (v.AuditEventType = 'TRANSCRIBE') OR (v.AuditEventType = 'AUTHENT')
GROUP BY v.InternalExamID,v.AuditEventType