You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Cory L Hubert <ch...@alloy.com> on 2003/03/20 17:34:28 UTC

How to do Max Query

	I am trying to do the equivilant of

select * from account where date_last_updated IN (Select
max(date_last_updated) from account )

	IN OJB.  I am using the PersistanceBroker.  Does anyone know who to do
this?


Re: How to do Max Query

Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi cory,

you can use a report query  like this:


        ReportQueryByCriteria query;
        Criteria crit;

        crit = new Criteria();
        crit.addLike("name", "%er");
        query = new ReportQueryByCriteria(Person.class, crit);
        query.setColumns(new String[] { "max(salary)" });
        broker.getReportQueryIteratorByQuery(query);

hth

jakob

Cory L Hubert wrote:

>	I am trying to do the equivilant of
>
>select * from account where date_last_updated IN (Select
>max(date_last_updated) from account )
>
>	IN OJB.  I am using the PersistanceBroker.  Does anyone know who to do
>this?
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>  
>


Problem with mailing list archive?

Posted by Chiah Tong Kiat <ct...@silicomp.com.sg>.
Hi

Is the mailing list archive having problem. I've been tring to access that mailing list archive for the past 2 days without any success.