Re: Searching on an Attributes Substring

Jeff Dunnett <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Jon,

Thanks for the advice but I suspect I wasn't clear enough.  The  
problem with what you doing is that it assumes that I am searching  
for any instance of a substring in a string.  What I am doing is  
looking at a specific field in a string.  I have a string that is  
actually a nine digit number I want to look at the 3 and 4 digits in  
that string.  In pure java I could look at this string like this:

aString.substring(3,4)

I was hoping there was a way to do something like that in without  
having to pull all the strings into memory.

Regards,
Jeff

On 27-Feb-06, at 5:29 PM, Jon Nolan wrote:

> Jeff,
>
> Not in fetch spec syntax but you'll get the idea.
>     new EOKeyValueQualifier("myStringAttribute",  
> EOQualifier.QualifierOperatorCaseInsensitiveLike, "*" + value + "*");
>
> Be sure your DB is up to the task though.  It can get hairy  
> depending on a myriad of things.
> Jon
>
>
> Jeff Dunnett wrote:
>> Hello,
>> I know that most DBMS have the SUBSTRING function that allows you  
>> to search substrings.  I have an attribute that is an NSString and  
>> would like to search on a substring of that attribute as part of a  
>> fetch specification.  Is this possible using EOModeler or manually  
>> building the fetch specification?  Is this possible or is using  
>> the SUBSTRING function in raw SQL the way to go?
>> Regards,
>> Jeff
>> _______________________________________________
>> WebObjects-dev mailing list
>> [email protected]
>> http://www.omnigroup.com/mailman/listinfo/webobjects-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.