Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 79401 invoked from network); 31 Jul 2008 22:29:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Jul 2008 22:29:20 -0000 Received: (qmail 15782 invoked by uid 500); 31 Jul 2008 22:29:18 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 15410 invoked by uid 500); 31 Jul 2008 22:29:17 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 15399 invoked by uid 99); 31 Jul 2008 22:29:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jul 2008 15:29:17 -0700 X-ASF-Spam-Status: No, hits=2.7 required=10.0 tests=HTML_MESSAGE,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of oconnell@gorillachicago.com does not designate 74.125.46.155 as permitted sender) Received: from [74.125.46.155] (HELO yw-out-1718.google.com) (74.125.46.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Jul 2008 22:28:19 +0000 Received: by yw-out-1718.google.com with SMTP id 5so471215ywr.6 for ; Thu, 31 Jul 2008 15:28:33 -0700 (PDT) Received: by 10.151.42.18 with SMTP id u18mr2038001ybj.72.1217543313554; Thu, 31 Jul 2008 15:28:33 -0700 (PDT) Received: from oconnell2 ( [75.146.115.137]) by mx.google.com with ESMTPS id 4sm447900yxq.8.2008.07.31.15.28.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 31 Jul 2008 15:28:32 -0700 (PDT) From: "Chris O'Connell" To: References: <483241.17882.qm@web30805.mail.mud.yahoo.com> In-Reply-To: <483241.17882.qm@web30805.mail.mud.yahoo.com> Subject: RE: Is there a way using Ibator to do a case-insensitive LIKE compare Date: Thu, 31 Jul 2008 17:28:30 -0500 Message-ID: <011f01c8f35c$c4fa54e0$4eeefea0$@com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0120_01C8F332.DC244CE0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcjzWlsJ6SLeNwKdS+KmRipuL617+gAAkrng Content-Language: en-us X-Virus-Checked: Checked by ClamAV on apache.org This is a multipart message in MIME format. ------=_NextPart_000_0120_01C8F332.DC244CE0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit What about a query with something like Select * from table where upper(NAME_COLUMN) like '%input_variable%' From: Robert Glover [mailto:robertgloverjr@yahoo.com] Sent: Thursday, July 31, 2008 5:10 PM To: user-java@ibatis.apache.org Subject: Is there a way using Ibator to do a case-insensitive LIKE compare 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) No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.5.10/1584 - Release Date: 7/31/2008 12:00 PM ------=_NextPart_000_0120_01C8F332.DC244CE0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

What about a query with something = like

 

Select * from table where upper(NAME_COLUMN) like = ‘%input_variable%’

 

 

From:= Robert = Glover [mailto:robertgloverjr@yahoo.com]
Sent: Thursday, July 31, 2008 5:10 PM
To: user-java@ibatis.apache.org
Subject: Is there a way using Ibator to do a case-insensitive = LIKE compare

 

   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)

No = virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.138 / Virus Database: 270.5.10/1584 - Release Date: = 7/31/2008 12:00 PM

------=_NextPart_000_0120_01C8F332.DC244CE0--