persistence@glassfish.java.net

RE: case insensitive

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Mon, 14 Jan 2008 13:47:19 -0500

case insensitiveYou could convert your query to : WHERE UPPER(c.name) LIKE UPPER(?1)

--Gordon
  -----Original Message-----
  From: TianMing Pan [mailto:Tpan_at_agilitylogistics.com]
  Sent: Monday, January 14, 2008 6:16 AM
  To: persistence_at_glassfish.dev.java.net
  Subject: case insensitive


  Hi,
        When I use the JPA, I am confuse about its query for how to make
  it case insensitive.
  For exampe, if I search in the db as "c.name like ?1" and setParameter 1
  as "china", then
  the result will not include the "China". So could you tell me how to
  make the query case
  insensitive? Thanks a lot.

  Rds


  All Business is handled subject to our General Trading Conditions. A copy can be made available upon request.