Re: How to build EOQualifier which generates "IN" SQL statement
Re: How to build EOQualifier which generates "IN" SQL statement
- Subject: Re: How to build EOQualifier which generates "IN" SQL statement
- From: Arturo Perez <email@hidden>
- Date: Wed, 24 Aug 2005 11:27:17 -0400
Kushnir Gennady wrote:
Hello all
How to perform SQL with "IN" selector to get Enterprise Objects as a
result?
I have EO with "type" attribute (which is link to another EO).
I want to fetch from database EOs of several "type"s. Of course I can
use something like
"type = good OR type = bad OR type = fine" etc.
However this does not seem efficient. SQL database provides single
statement for this "type IN (good, bad, fine, etc.)"
Notwithstanding the advice to find the IN qualifier floating about but
to address the efficiency question.
In reality, Oracle at least, converts IN statements with an explicit
list of attributes into a big OR statement. So the efficiency is
equivalent either way.
On the other hand, nothing beats a good select * from from bar where x
in (select y from z);
-arturo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden