• I agree more table definition would be helpful.

    And the counts in the tables would also be nice to know.

    It appears you are looking for adjustment records that have no adjustment detail record and no unprocessed adjustment detail record.

    You might want to give a try at just this subset first and see how that performs.

    I would expect that there should be relatively few inv adjustment records per inv record in most systems.

    The trigger idea is one way, although I might look a bit at overall table and relations too.

    A table for unprocessed is something I might just handle with a status if you have an option.

    Then views can be very helpful.