Re: A JOIN question

Поиск
Список
Период
Сортировка
От Michael Lewis
Тема Re: A JOIN question
Дата
Msg-id CAHOFxGrpoBSWT=0QwxjtQPSmTqr6awcV3TBOGx=t5p7Pj9fncQ@mail.gmail.com
обсуждение исходный текст
Ответ на A JOIN question  (stan <stanb@panix.com>)
Ответы Re: A JOIN question  (stan <stanb@panix.com>)
Список pgsql-general
LEFT join mfg_vendor_relationship on
        mfg_vendor_relationship.mfg_key = mfg_part.mfg_key
        AND
        mfg_vendor_relationship.project_key = bom_item.project_key
LEFT join vendor on
        mfg_vendor_relationship.vendor_key = vendor.vendor_key
 
Perhaps I am missing something, but it seems like just a matter of changing inner join to left so you keep what you already have and augment vendor information when it exists. I never use right joins (I re-write to always declare as left) so I am not sure if the right join near the top screws that up. I might consider using a UNION ALL to combine sets where values are NULL with left joins, and use plain (inner) joins for the not nulls.

В списке pgsql-general по дате отправления:

Предыдущее
От: stan
Дата:
Сообщение: A JOIN question
Следующее
От: stan
Дата:
Сообщение: Re: A JOIN question