get entry from table whose column contains minimum or maximum value

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Wai
Reply | Threaded
Open this post in threaded view
|

get entry from table whose column contains minimum or maximum value

Wai
I want to read an entry from a table where a given column contains the
largest/smallest value.
Is there a way to achieve this without reading all entries and processing it
in code.



--
Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html
Reply | Threaded
Open this post in threaded view
|

Re: get entry from table whose column contains minimum or maximum value

deepak nigam-2
Hi Wai,

One way to achieve this is to use orderBy in combination with
getFirst/queryFirst functions.

Thanks & Regards
--
Deepak Nigam

On Mon, Oct 30, 2017 at 12:06 PM, Wai <[hidden email]> wrote:

> I want to read an entry from a table where a given column contains the
> largest/smallest value.
> Is there a way to achieve this without reading all entries and processing
> it
> in code.
>
>
>
> --
> Sent from: http://ofbiz.135035.n4.nabble.com/OFBiz-User-f135036.html
>