In case anyone is confused as to what I'm trying to accomplish, it's an outer
join on line
items where both sides match with no NULL items.
If my approach is poor, then I won't have to worry about question about the
exception.
SELECT po.ID, pb.ID
FROM
RPL_PO po
JOIN RPL_POBILL pb
ON
I think it is likely that your query could be improved. Am I right in
assuming that you want
there in ALL cases where there is an RPL_PO_ITM to also exist at least
one RPL_POBILL_ITM
record and that all matching RPL_POBILL_ITM must have COST defined?
No. In all cases for each RPL_PO_ITM.NDC
This query returns 'no current record for fetch operation'
SELECT po.ID, pb.ID
FROM
RPL_PO po
JOIN RPL_POBILL pb
ON pb.PO = po.ID
WHERE
po.ID = ? AND
NOT EXISTS (
SELECT 1
FROM RPL_PO_ITM poi
LEFT JOIN RPL_POBILL_ITM pbi
ON poi.NDC = pbi.NDC AND pbi.INVOICE = pb.ID
In case anyone is confused as to what I'm trying to accomplish, it's an
outer join on line items where both sides match with no NULL items.
If my approach is poor, then I won't have to worry about question about
the exception.
SELECT po.ID, pb.ID
FROM
RPL_PO po
JOIN RPL_POBILL pb
ON pb.PO
Rick,
In case anyone is confused
Count me as one of them!
as to what I'm trying to accomplish, it's an outer
join on line items where both sides match with no NULL items.
If my approach is poor, then I won't have to worry about question about the
exception.
What happens with this query?