so I finally found,.....

Integer i = 
(Integer)ERXEOControlUtilities.aggregateFunctionWithQualifier(versionListEC, 
"Version", "itemIndex", "MAX", Version.JOB.eq(theJob()));

I hope this is the 'best'... I hate using raw sql.... (Or maybe I should say I 
like wonder...)

Ted

--- On Fri, 5/28/10, Michael Sharp <[email protected]> wrote:

> From: Michael Sharp <[email protected]>
> Subject: Re: max value using wonder??
> To: "Theodore Petrosky" <[email protected]>
> Cc: [email protected]
> Date: Friday, May 28, 2010, 8:28 PM
> Have a look at
> ERXEOControlUtilities.aggregateFunctionWithQualifier
> 
> 
> On 29/05/2010, at 10:22 AM, Theodore Petrosky wrote:
> 
> > if I were writing my own sql, I would:
> > 
> > SELECT MAX(c_item_index) FROM t_version WHERE c_job_id
> = 100002;
> > 
> > is there a way to do this without resorting to raw
> sql? 
> > 
> > I have so far not had to use any raw sql and was
> hoping there was a "Wonder" way to do this.
> > 
> > Ted
> > 
> > 
> > 
> > _______________________________________________
> > Do not post admin requests to the list. They will be
> ignored.
> > Webobjects-dev mailing list      ([email protected])
> > Help/Unsubscribe/Update your Subscription:
> > http://lists.apple.com/mailman/options/webobjects-dev/getsharp%40gmail.com
> > 
> > This email sent to [email protected]
> 
> 



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

This email sent to [email protected]

Reply via email to