db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Dietrick <robert.dietr...@nokia.com>
Subject case insensitive queries
Date Sat, 28 Jan 2006 04:44:30 GMT
I'm having difficulties getting a portion of my WHERE clause to be case 
insensitive with Oracle, and I'm wondering if this problem's been solved 
already.

I've tried Criteria.setIgnoreCase(true), which forces all parts of the 
WHERE clause to ignore case, and I've tried 
Criterion.setIgnoreCase(true), which does absolutely nothing (does this 
work with other databases???).

I've also tried the custom route: Criteria.add(columnName, 
"UPPER("+columnName+") = " + someValue.toUpperCase()).  But this is 
inherently dangerous when the value (someValue) is coming from an end 
user.  (May allow users to execute arbitrary SQL.)

What I want is something which results in the left half being converted 
to upper case and the right half still using a bind variable:
UPPER(columnName) = ?

Anyone know if this is possible?  I'm using the latest version (3.2).

Thanks.

-rob


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message