Database SQL Operation: CaseHeader.searchCaseIDByStatusCodeAndProduct
Description: | This readmulti is based on a join between the CaseHeader and productDelivery table, where the case status matches the key and the productID matches. This is only applied to Cases of type Product Delivery. |
Sterotype: | nsmulti |
SELECT
CaseHeader.caseID
INTO
:caseID
FROM
CaseHeader,
ProductDelivery
WHERE ProductDelivery.productID = :productID
AND CaseHeader.caseID = ProductDelivery.caseID
AND CaseHeader.statusCode = :statusCode
AND
(
CaseHeader.caseTypeCode = :caseTypeCode1
OR CaseHeader.caseTypeCode = :caseTypeCode2
)
|