Operation Details
Description:  
Sterotype: nsmulti
SQL
SELECT
  temporalEvApprovalCheckID,
  organisationUnitID,
  userName,
  positionID,
  evidenceType,
  approvalType,
  percentage,
  comments,
  recordStatus,
  versionNo
INTO
  :temporalEvApprovalCheckID,
  :organisationUnitID,
  :userName,
  :positionID,
  :evidenceType,
  :approvalType,
  :percentage,
  :comments,
  :recordStatus,
  :versionNo 
FROM
  TemporalEvidenceApprovalCheck 
WHERE TemporalEvidenceApprovalCheck.approvalType = :approvalType 
  AND TemporalEvidenceApprovalCheck.evidenceType IN 
  ( 
  SELECT
    evidenceType 
  FROM
    EvidenceMetadata 
  WHERE EvidenceMetadata.recordStatus = :recordStatus 
    AND EvidenceMetadata.evidenceMetadataID IN 
    ( 
    SELECT
      evidenceMetadataID 
    FROM
      ProductEvidenceLink 
    WHERE ProductEvidenceLink.productID = :productID 
    ) 
  )