Operation Details
Description: Returns the history for an Objective on a Case.
Sterotype: nsmulti
SQL
SELECT
  CaseNomineeObjective.fromDate,
  CaseNomineeObjective.toDate,
  ConcernRole.concernRoleID,
  ConcernRole.concernRoleName,
  ConcernRole.concernRoleType,
  CaseNomineeObjective.caseNomineeID,
  CaseNomineeObjective.fromCaseStartDateInd
INTO
  :fromDate,
  :toDate,
  :concernRoleID,
  :concernRoleName,
  :concernRoleType,
  :caseNomineeID,
  :fromCaseStartDateInd 
FROM
  CaseNomineeObjective,
  ConcernRole,
  CaseParticipantRole,
  CaseNominee 
WHERE CaseNomineeObjective.rulesObjectiveID = :rulesObjectiveID 
  AND CaseNomineeObjective.statusCode = :statusCode 
  AND CaseNominee.caseNomineeID = CaseNomineeObjective.caseNomineeID 
  AND CaseParticipantRole.caseParticipantRoleID = CaseNominee.caseParticipantRoleID 
  AND CaseParticipantRole.caseID = :caseID 
  AND ConcernRole.concernRoleID = CaseParticipantRole.participantRoleID 
  AND 
 ( 
	( 
		CaseNomineeObjective.fromDate <= :toDate AND ( CaseNomineeObjective.toDate >= :fromDate OR CaseNomineeObjective.toDate IS NULL ) 
	) 
 OR 
	( 
		:toDate IS NULL AND ( CaseNomineeObjective.toDate >= :fromDate OR CaseNomineeObjective.toDate IS NULL ) 
	) 
 )
 ORDER BY CaseNomineeObjective.toDate ASC