Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Case-Insensitive Queries

MarioRNov 30 2010 — edited Dec 7 2010
Hi

When you create a row in a View Criteria where the value is a String, by default (in version 11.1.1.3.0) it marks the "Ignore Case" checkbox. Although we want to perform case-insensitive queries, or at least change the String entered by the user in lowercase in a query to uppercase at the time the query is issued to the database, this is problematic when the row is using an attribute which is part of an index on the Database query. Reason being that the toUpperColumns property does just that...wraps the column name in an UPPER() clause..thereby disabling the index search and causing the queries to be Full Table Scans.

What are the best ways to control this and get the "Best of both worlds", i.e. upper only certain values at query time without manipulating the DB table's column...and at the same time leave the query as case sensitive for other attributes where you might want to be able to query on mixed case (like description fields).

I have read through a number of blogs on the subject but none seem to cater for this fully. (Please advise if you know of any). The closest I came was Steve Meunch's blog where this was done in the extention classes, specifically in the extention class for ViewCriteriaRow, and any string values were set to uppercase in the overridden setAttribute method...I assume this was for older versions of ADF as in 11.1.1.3.0 the method never gets called when doing a query.

As soon as we go live the DBA's are going to have a field day shooting us down when they see all the queries are doing full table scans!! Alternatively tell the users that the searches they enter are case sensitive...also won't be acceptable.

Any advice / references please?

Thanks
Mario
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 4 2011
Added on Nov 30 2010
6 comments
1,445 views