• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: stringQualifierOperators (like, contains) (David Holt)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stringQualifierOperators (like, contains) (David Holt)


  • Subject: Re: stringQualifierOperators (like, contains) (David Holt)
  • From: Paul D Yu <email@hidden>
  • Date: Wed, 14 Dec 2005 08:48:42 -0500

David

You should be using something like this for a case insensitive search

EOKeyValueQualifier q1 = new EOKeyValueQualifier("title", EOQualifier.QualifierOperatorCaseInsensitiveLike, mytitle);

Are you using Oracle?  If you are the Contains clause if for the Context Index not the normal VARCHAR index.  And you would have to do see http://developer.apple.com/documentation/LegacyTechnologies/WebObjects/WebObjects_5/Topics/ProgrammingTopics.3a.html.

Which will talk about this.

Creating an EOSQLQualifier with "CONTAINS" (Java)

 EOEntity anEntity=EOModelGroup.defaultGroup().entityNamed("MyEntity"); 
EOSQLQualifier (anEntity, "CONTAINS(columnName,'"+someString+", 1)>0");

Hope this helps.

Paul

Paul
On Dec 13, 2005, at 7:59 PM, email@hidden wrote:


SELECT t0.evidence_abstract, t0.title, t0.year_publication FROM 

evidence t0 WHERE UPPER(t0.title) LIKE UPPER('%handwashing%') ESCAPE 

'|'


This is exactly the SQL that I would expect for a case insensitive LIKE 

and returns the results expected.


The "LIKE" qualifier generates this SQL:


SELECT t0.evidence_abstract, t0.title, t0.year_publication FROM 

evidence t0 WHERE t0.title like 'handwashing' ESCAPE '|'


This SQL generates no results even though the word handwashing appears 

in 25 titles.


My question is whether the "like" qualifier should even be there? 

"Contains" gives me the results I expect from a "like" query. I can't 

get the "like" query to generate results under any circumstances, yet 

it is exposed as one of the choices to my users and potentially causes 

confusion. Is anyone else running into this? Am I misunderstanding what 

"like" should be returning because of my background using SQL? Is this 

a bug?


Thanks,

David



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Java Client Cursor placement in text fields?
  • Next by Date: RE: Webobjects-dev Digest, Vol 2, Issue 782
  • Previous by thread: Re: Java Client Cursor placement in text fields?
  • Next by thread: RE: Webobjects-dev Digest, Vol 2, Issue 782
  • Index(es):
    • Date
    • Thread