Can I have a correlated subquery in the FROM clause for DB2 for i?
This doesn't seem to be working...
with list as (select line, ndcupc, gppc
from tempsav.cmw
left outer join medispan.mf2ndc on ndc = ndcupc )
select *
from list L
left outer join (select ndcupc, idescr
, olsmlprg.calccustacqcost(decimal(150,6,0),
iitnbr) as acq_cost
, gppc
from medispan.mlitems M
left outer join
olsdta.ioritemmst using (iitnbr)
where gppc = m.gppc
order by 3
fetch first row only) as lowprc
on L.gppc = lowprc.gppc
;
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.