Database SQL Operation: QuestionnaireVersion.searchQuestionnaireForDeterminationPackage
Description: | Reads details of most recent versions of all questionnaires associated with a specified version of a determination package |
Sterotype: | nsmulti |
SELECT
questionnaireID,
MAX(questionnaireVersionNumber)
INTO
:questionnaireID,
:version
FROM
QuestionnaireVersion
WHERE questionnaireVersionID IN
(
SELECT
questionnaireVersionID
FROM
DPQuestionnaireLink
WHERE determinationPackageVersionID = :determinationPackageVersionID
)
GROUP
BY questionnaireID
|