I have a BAQ here for APInvHed and Vendor which shows me suppliers, their location, the last invoice date, etc.
I want to see if they have any open POs out there. How can I do this? I attached POHeader to Vendor but when I brought up OpenOrder field it gave me a bad SQL error.
If you want to know how many open POs each vendor has, you could create a subquery of open PORel’s. Group by VendorNum and COUNT the number of PORels.
Then LEFT OUTER JOIN that subquery to your current query on vendornum.
If, on the other hand, you want to list the open PO’s, then instead make the current query a subquery. In the new Toplevel query, LEFT OUTER JOIN the subquery to the PORel table and display PONum, POLine, PORel, etc.