The following construct does what I need but is there a better way of
expressing this?
select * from
(
SELECT DISTINCT section.section_pk
FROM ITEM LEFT JOIN product product ON Item.product_fk = product.product_pk LEFT JOIN section section ON
product.section_fk= section.section_pk
WHERE item.export = 'f'
EXCEPT
SELECT DISTINCT section.section_pk
FROM ITEM LEFT JOIN product product ON Item.product_fk = product.product_pk LEFT JOIN section section ON
product.section_fk= section.section_pk
WHERE item.export = 't'
) as X
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
✖
By continuing to browse this website, you agree to the use of cookies. Go to Privacy Policy.