How do I write a fetch request that will get the entity with the max value?
How do I write a fetch request that will get the entity with the max value?
- Subject: How do I write a fetch request that will get the entity with the max value?
- From: Scott Ellsworth <email@hidden>
- Date: Mon, 1 Aug 2005 17:42:07 -0700
Hi, all.
My World entity has pop and tech int16 attributes. I want to find
the Entity with the largest value of pop+tech/3.
I have read through the NSPredicate BNF doc until I am blue in the
face, but the xcode data modeler does not like anything I have thrown
at it. How do I find the World with the largest value for pop+tech/3?
The obvious "max(pop+tech/3)" does not work, though weird ones like
"max(pop+tech/3)>7 do not throw a syntax error. It is not the query
I want to do, but it does not throw a syntax error.
I have done harder things than this with the data modeler, but this
one has me stumped. Anyone happen to know the answer?
Scott
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden