Yes, it can be done. Just remember that some databases has problems to use indexes 
when you apply functions over the fields (SapDB 7.2 had this problem... I've not been 
using this since then, so I don't know if still have).

Other: I think you made a typo. Should not be

myCriteria.addEqualTo("UPPER(meinStringField)", "MYTEXT"

???

Best regards,

Edson Richter

  ----- Original Message ----- 
  From: [EMAIL PROTECTED] 
  To: OJB Users List 
  Sent: Thursday, February 19, 2004 10:16 AM
  Subject: Antwort: How to do a not casesensitive string equal Criteria ?



  Hi Stefan,

  you can try this:  myCriteria.addEqualTo("UPPER(meinStringField)", "mytext"
  );
  Works at least for DB2.

  Regards
  Lasse







  |---------+----------------------------->
  |         |           Stefan Schl�sser  |
  |         |           <[EMAIL PROTECTED]|
  |         |           mediate.de>       |
  |         |                             |
  |         |           19.02.04 13:51    |
  |         |           Bitte antworten an|
  |         |           "OJB Users List"  |
  |         |                             |
  |---------+----------------------------->
    
>-------------------------------------------------------------------------------------------------------------------------------|
    |                                                                                  
                                             |
    |        An:      OJB Users List <[EMAIL PROTECTED]>                               
                                        |
    |        Kopie:                                                                    
                                             |
    |        Thema:   How to do a not casesensitive string equal Criteria ?            
                                             |
    
>-------------------------------------------------------------------------------------------------------------------------------|



  Hi,

  I'd like to formulate a Criteria

  crit.addEqualTo("meinStringField", "mytext");

  which should match MYTEXT, mytext, MyText etc. i.e. a incasesensitive
  match.
  How do I do that using ojb (without resorting to tablecolumn names or
  straight sql) ?
  By the way, I am using SAPDB and HSQL

  Thanks for your help,

  Stefan


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]







  ---------------------------------------------------------------------
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.591 / Virus Database: 374 - Release Date: 17/2/2004

Reply via email to