Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.
SELECT Top 1 CASE WHEN DataValidationDue > GETDATE() THEN 'Pending' ELSE 'Overdue' END AS STATUS, 'DV' AS Action, Convert(varchar,DataValidationDue,111) AS DateDue,ID,''as[Title],CreateDate FROM dhpMVRRequest WHERE DriverRecordID = @DriverRecordID and Cancelled is null and (DataValidationDue IS NOT NULL and DataValidationComplete is null) Union Select CASE WHEN DueDate > GETDATE() THEN 'Incomplete' ELSE 'Overdue' END as [STATUS], b.URL AS Action, Convert(varchar,DueDate,111) AS DateDue, a.courserecordid as [ID], b.Title,a.CreateDate From lms_assignments a join LMS_Courses b on b.ID = a.CourseRecordID where a.DriverRecordID = @DriverRecordID and a.DeleteDate is null and b.Active = 1 Union SELECT 'Optional' AS STATUS, 'OLU' AS Action, Convert(varchar,GETDATE()+90,111) AS DateDue,ID, '' AS Title,CreateDate From dhpDriver Where id=@DriverRecordID and driverlicensestate='GA' //I tried adding this to the bottom here...it made no difference order by dhpMVRRequest.CreateDate desc
|SQL Server - Performance Very Sluggish||14||57|
|What task or combo of tasks can I use in ssis 2015 to load different file names into different tables into sql server?||7||27|
|Azure Web App - See files||3||14|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
14 Experts available now in Live!