SELECT
adminIntegratedCaseID,
homePageName,
aic.integratedCaseType,
memberHomePageName,
aic.statusCode,
employerHomePageName,
personHomePageName,
infoProviderHomePageName,
productProviderHomePageName,
serviceSupplierHomePageName,
utilityHomePageName,
representativeHomePageName,
ppHomePageName,
cp.caseID,
cp.participantRoleID
INTO
:adminIntegratedCaseID,
:homePageName,
:integratedCaseType,
:memberHomePageName,
:statusCode,
:employerHomePageName,
:personHomePageName,
:infoProviderHomePageName,
:productProviderHomePageName,
:serviceSupplierHomePageName,
:utilityHomePageName,
:representativeHomePageName,
:ppHomePageName,
:caseID,
:participantRoleID
FROM
CaseHeader ch,
CaseHeader ch2,
CaseParticipantRole cp,
AdminIntegratedCase aic
WHERE cp.caseParticipantRoleID = :caseParticipantRoleID
AND ch.caseID = cp.caseID
AND ch.integratedCaseID = ch2.caseID
AND ch2.integratedCaseType = aic.integratedCaseType
UNION
(
SELECT
adminIntegratedCaseID,
homePageName,
aic.integratedCaseType,
memberHomePageName,
aic.statusCode,
employerHomePageName,
personHomePageName,
infoProviderHomePageName,
productProviderHomePageName,
serviceSupplierHomePageName,
utilityHomePageName,
representativeHomePageName,
ppHomePageName,
cp.caseID,
cp.participantRoleID
FROM
CaseHeader ch,
CaseParticipantRole cp,
AdminIntegratedCase aic
WHERE cp.caseParticipantRoleID = :caseParticipantRoleID
AND ch.caseID = cp.caseID
AND ch.integratedCaseType = aic.integratedCaseType
)
|