Re: how do i say that in EOModeler
Re: how do i say that in EOModeler
- Subject: Re: how do i say that in EOModeler
- From: Bill Reynolds <email@hidden>
- Date: Thu, 29 Jul 2004 08:48:30 -0700
Sako!,
The like-where9 condition is pretty simple to use. I9ve pasted a function
below that I use to find a 3company name like92. It9s a qualified9 fetch
spec and it9s designed to do what you9re doing.
Hope it helps,
-Bill
public void searchByCoName(String coNameToLookFor) {
setSearchStringDisplay(coNameToLookFor);
setFoundMatch(true);
try{
//Build qualifier
NSMutableArray args = new NSMutableArray();
args.addObject(coNameToLookFor + "*"); //the "*" is a wildcard
pasted to the end of the search string
EOQualifier qualifier =
EOQualifier.qualifierWithQualifierFormat("CO_NAME like %@", args);
//Build fetch spec
EOFetchSpecification spec = new EOFetchSpecification("RegUsers",
qualifier, null);
//Get editing context
EOEditingContext ec = session().defaultEditingContext();
//Fetch
NSArray array = ec.objectsWithFetchSpecification(spec);
foundUsers = new NSMutableArray(array);
//stuff
if(foundUsers.count() == 0)
setFoundMatch(false);
} catch (Exception e) {
}
}
> From: Sako! <email@hidden>
> Date: Thu, 29 Jul 2004 08:04:15 -0700
> To: <email@hidden>
> Cc: omni group <email@hidden>
> Subject: how do i say that in EOModeler
>
> hi,
>
> i have a table TAB, includes Column Krit from kind Text in my MS-SQL.
> ------------------------------------------
> i want to search the rows who include the text "Sent EMail". i do this :
>
> SELECT T1.Krit
> FROM TAB T1
> WHERE T1.Krit like '%Sent EMail%'
>
> ------------------------------------------
>
> and if i want to search the rows which dont include the text"Sent EMail". i
> do this:
>
> SELECT T1.Krit
> FROM TAB T1
> WHERE T1.Krit not like '%Sent EMail%'
>
> ------------------------------------------
> both sql work.
>
> now my question how do i say that in EOModeler?
>
> i tried with (krit like '%Sent EMail%') in a Fetch but id didnt work.
>
> regards
>
> Sako.
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.