ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Glover <robertglove...@yahoo.com>
Subject Is there a way using Ibator to do a case-insensitive LIKE compare
Date Thu, 31 Jul 2008 22:09:39 GMT
   Disclaimer:  I really, really like Ibator and use it in all my projects.

   A programmer has inherited one of my projects that uses Ibator.  He needs to use Ibator
to do some name comparisons on people's names.  For example, a database column might contain
 a value of "John .J. Hancock".  He wants to use Ibator to do  a "LIKE" compare against "%HANCOCK%".
 Unfortunately it is Oracle 10i, not MySql.  So, no match results because Oracle is case sensitive.
(MySql is not case sensitive). 
     Short of modifying the java code that Ibator generates,  is there any way  using Ibator
to do the "LIKE"  as if the column in the database  contained "JOHN J. HANCOCK"  instead of
"John .J. Hancock"? 
     I realize that one solution would be to create a VIEW of the TABLE that had the column
value upper-cased and then run the VIEW into an IBATOR generation, but he would prefer not
to have to do that.

Thanks in advance,
Robert (a bit Ibator fan)

View raw message