UPDATE ReportDefinition
SET ReportAbandonTime = CASE WHEN @ReportStatus = '4' THEN GetDate() ELSE NULLEND, ReportStatus = @ReportStatus
WHERE (ReportID = @ReportID)
SET ReportAbandonTime = CASE WHEN @ReportStatus = '4' THEN GetDate() ELSE NULLEND, ReportStatus = @ReportStatus
WHERE (ReportID = @ReportID)