Use SepcialityFetches from the HoudahEOAccess framework.

On 11 Dec 2008, at 21:44, David Avendasora wrote:

Hi all,

I've googled this, but can't seem to find any answers even though I'm guessing it's a pretty common thing.

I have a table that has nearly 2 million rows and I want to retrieve the maximum value used in the entire table for a given field. The SQL equivelent would be:

SELECT MAX(FIELD) FROM TABLE

Ideally, I'd like the whole row like this would get for me:

SELECT * FROM TABLE
WHERE ID = (SELECT MAX(ID) FROM TABLE)

but I'd be happy just to get the maximum value in that one field.

Should I just do it with straight SQL, or is there a good EOF/Wonder way to do it where I let EOF deal with the DB?

The field is indexed, so the straight SQL call is instantaneous.

Thanks,

Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/pierre.bernard%40lists.houdah.com

This email sent to pierre.bern...@lists.houdah.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to