Viewing post 1 (of 1 total)
You need to eliminate hash join and Index scan.
With this query you can do that using INTERSECT AND EXCEPT
SELECT CustomerID
FROM #Purchase
WHERE ProductCode = 'A'
INTERSECT
WHERE ProductCode = 'B'
EXCEPT
SELECT...
March 29, 2012 at 3:15 am
#1466241