I have a query that brings back all of the Purchase Order Distributions and gives me all of the data I need -- except I cannot join POP30390 to the POP10110 or POP30110 through tables like POP30390, etc. I have the PONUMBER field but cannot find how I get the LineNumber for the PO. Shouldn't I be able to? Thanks much.
select rcpt_ln_hist.PONUMBER, rcpt_hist.POPRCTNM, rcpt_ln_hist.RCPTLNNM, rcpt_ln_hist.VNDITNUM
, pm_dist_hist.DEBITAMT, pm_dist_hist.CRDTAMNT
from POP30390 pm_dist_hist -- 87734
inner join GL00100 mstr
on pm_dist_hist.ACTINDX = mstr.ACTINDX
inner join POP30310 rcpt_ln_hist -- 46265
on pm_dist_hist.POPRCTNM = rcpt_ln_hist.POPRCTNM -- there is a small cartesian here
inner join POP30300 rcpt_hist
on rcpt_ln_hist.POPRCTNM = rcpt_hist.POPRCTNM