I am having trouble trying to write the SQL statement to join the SQL Tables in my Database Expert. I have 3 tables. (1)Base, (2)OOHEADNotes, and (3) OOLINENotes. The 3 tables are SQL statements off one database, which is a DB2.
My goal is to have a text label field in the report with the SQLformula 'OrderHeadNotes' which would be like:
SELECT OOHEADNOTES.OATX60 FROM OOHEADNOTES as OO
INNER JOIN BASE as B ON (OO.OATXID=B.OATXID or OO.OAPOTX=B.OAPOTX or OO.OAPRTX=B.OAPRTX)
I need the actual Notes field (OATX60) based on the PK's of BASE (OATXID,OAPOTX,OAPRTX) joined to the FK's of OOHEADNotes(OATXID, OAPRTX, OAPOTX).
I have included the report.