• 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
How do I write a fetch request that will get the entity with the max value?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How do I write a fetch request that will get the entity with the max value?
      • From: Scott Ellsworth <email@hidden>
    • Re: How do I write a fetch request that will get the entity with the max value?
      • From: Charilaos Skiadas <email@hidden>
  • Prev by Date: Re: Svn in Xcode 2.1 stoppen working - why?
  • Next by Date: Re: Custom line breaking in NSTextView
  • Previous by thread: Re: Svn in Xcode 2.1 stoppen working - why?
  • Next by thread: Re: How do I write a fetch request that will get the entity with the max value?
  • Index(es):
    • Date
    • Thread