hi
hope this helps
solved = yes
why am i doing this ? = different way =using join= perhaps better performance wise ???
SELECT
distinct PIR1.*
FROM
Purchase_Invoice_Results PIR1
LEFT JOIN
Purchase_Invoice_Results PIR2 ON PIR1.InvoiceNo = PIR2.InvoiceNo AND PIR2.Source = 'PO'
WHERE
PIR1.Source = 'PO' OR (PIR1.Source = 'INV' AND PIR2.InvoiceNo IS NULL);
result
