The reason upper(last_name) does a full table scan is that you do not have any function based indexes defined for that table. With oracle you can create indexes based on a function like upper(). You could always change your logic to uppercase the string before placing it into the SQL string. Then you could do something like
...where last_name=’SMITH’;
On 8/3/06 8:29 PM, "Dave Elsner" <[EMAIL PROTECTED]> wrote:
Hi,
Firstly I thought I would reply to this existing thread as I believe my situation is similar.
I'm using oracle and have an index on a varchar field that I would like to do a case insensitive search still using the index on last_name since I know all my last_name start with a capital.
e.g select * from user where last_name = 'smith'
will use the index but not return any Smith's because of the upper case 'S'
and if I did a: select * from user where upper(last_name) = 'SMITH'
The select would not use my index and do a full table scan.
What I would like to do is
select * from user where last_name = initcap = 'smith'
Which would return the rows and still use my index. Is there an easy way of doing this instead of using:
a) Use _javascript_ to change the form field to Smith instead of smith
b) ERXJDBCAdaptor
c) subclass the OraclePlugIn
Regards
David
On 02/08/2006, at 8:49 PM, Anjo Krank wrote:
a) post a bug report, wait a year, then chose option two or three
b) install Project Wonder, look at how we do it the ERXJDBCAdaptor, which gets patched into the runtime.
c) or subclass the MicrosoftPlugIn, use JDBCPlugin.setPlugInNameForSubprotocol("com.somewhere.MyMicrosoftPlugIn", "sqlserver") to patch it into the system (before a model gets loaded). You might need to remove the plugin key from your connection dict for this to work.
Cheers, Anjo
Am 02.08.2006 um 12:36 schrieb Webobjects:
QUESTION: How/where can I modify the JDBC Plugin for EOF to adjust the way it generates the INSERT and UPDATE clauses of the outgoing SQL?
QUESTION: How can I modify the JDBC Plugin to do the SELECT qualifiers?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/delsner%40uow.edu.au
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/drosenberg%40inquira.com
This email sent to [EMAIL PROTECTED]
--
Dov Rosenberg
Inquira Inc
370 Centerpointe Circle, ste 1178
Altamonte Springs, FL 32701
(407) 339-1177 x 102
(407) 339-6704 (fax)
[EMAIL PROTECTED]
AOL IM: dovrosenberg
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]
