Automate

 View Only
  • 1.  Outer left join

    Posted 10-07-2025 09:53
    Edited by PP Wortman 10-10-2025 01:31

    I created a query, but if there is no data for columns BF and BG, no response is returned. Now I probably have to do that with a lef outer join, but I have no idea how that works.


    The problem is solved!

    Attachment(s)

    xlsx
    Table_BP.xlsx   804 KB 1 version
    Qsq
    Table_BP - kopie.Qsq   823 KB 1 version


  • 2.  RE: Outer left join

    Employee
    Posted 10-10-2025 13:19
    Edited by Sigrid Kok 10-10-2025 13:31

    Hi PP

    The default is an inner join, meaning you will only get output if you have matches in your joins from table 1 and talbe 2

    A left outer join means you would get all of table 1 and matches to table 2. There are limits in that you can only have 1, and depending on the tables and how you join them, it may not be allowed.

    I see you have a lot of tables in this query:

    BUT000 the main BP table

    BUT020 address link

    ADRC the address 

    All of the main customer tables - KNA1 (general), KNB1 (company), KNVV (sales)

    ADR6 email

    BUT0ID - BP id numbers - haven't used this one

    DFKKBPTAXNUM - I haven't used this table before

    In general, I would not join every key field with every other table.  It's best to have a main table and join the children tables to the parent. The children may have children tables, and those can be joined, too.

    Can you please describe what you would like in the output? And when you're not getting output for these fields, what you might expect to see.

    Thanks,

    Sigrid



    ------------------------------
    Sigrid Kok
    *Precisely Software Inc.
    ------------------------------



  • 3.  RE: Outer left join

    Posted 10-14-2025 02:22

    I have made further progress with your response, Sigrid. This has been helpful. I had to split the query into two queries, and it is now functioning. Thank you for the information.



    ------------------------------
    PP Wortman
    Mister
    Dekker Zevenhuizen B.V.
    ------------------------------