joining these 2 tables

Sort:
You are not authorized to post a reply.
Author
Messages
wally
Basic Member
Posts: 11
Basic Member
    I am trying to join two tables, APINVOICE and APDISTRIB. Can you please help me understand the following below which is posted on https://www.lawsonguru.co...ables/APINVOICE.html

    Scroll down to the "one to many relationships" then to the APDISTRIB part.

    Is that saying I need to join API-OBJ-ID to both APD-API-OBJ-ID and APD-DIST-SEQ-NBR or is it saying I have a choice between the two?
    Kwane McNeal
    Veteran Member
    Posts: 479
    Veteran Member
      The link is with OBJ-ID. The reason SEQ-NBR is also needed is that it's possible that there are multiple distributions for a single invoice, usually when you have partial pays, or recurring invoices and the like.
      wally
      Basic Member
      Posts: 11
      Basic Member
        so then I link API-OBJ-ID to "both" APD-API-OBJ-ID AND APD-DIST-SEQ-NBR?
        John Henley
        Senior Member
        Posts: 3348
        Senior Member
          No, you left outer join from APINVOICE (API) to APDISTRIB (APD) by joining API.OBJ_ID to APD.API_OBJ_ID.
          You do not include APD-DIST-SEQ-NBR in the join.
          Thanks for using the LawsonGuru.com forums!
          John
          You are not authorized to post a reply.