Intersect in Cache Database
Hi,
What is the alternative for INTERSECT in cache. I tried Intersect but not working.
Thanks for suggestions.
thanks
Jude
Comments
Have you tried using a JOIN to get the desired results?
If you have already tried using a JOIN, what are you seeing that is not expected?
Hi Peter and Jude,
I am also trying to use the idea of INTERSECT. Instead of intersect, I'm using a RIGHT JOIN or a LEFT JOIN, but the query plan isn't using the faster table to loop through the data.
I found that changing the Group By to the table that I want the query plan to use for the loop, made it much faster.
Hi, i know that's an old post but still,
I also needed to use an INTERSECT statement and I managed to replace it with "IN"
example:
SELECT ID FROM Table
WHERE Row=Name AND ID IN (
SELECT ID FROM Table
WHERE Row=Surname)
Instead of:
SELECT ID FROM Table
WHERE Row=Name
INTERSECT
SELECT ID FROM Table
WHERE Row=Surname
Hope that can help anyone with the same issue ^^