I have stared at this for a while to no avail. I'm not sure why this isn't working,the errror i'm getting is a "invalid sql statement" error. Here's the rough SQL statement:
select A, B
from X
where A,B in (select Y,Z
from C
where ....)
As an alternative and a performance comparison, try:
Code:
SELECT A,B
FROM X
WHERE exists (select 'foo' from C
WHERE x.a = Y
and x.b = Z);
This construction typically performs much faster, producing the same results.
Let us know your findings.
Mufasa
(aka Dave of Sandy, Utah, USA)
[I can provide you with low-cost, remote Database Administration services: see our website and contact me via www.dasages.com]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.