| Author |
alternate way for using max in ejbql
|
dhriti joshi
Ranch Hand
Joined: Aug 13, 2002
Posts: 82
|
|
I guesss select max is not supported by ejbql. is there any way to do it,like get the entire collection of field and then find max. please help. thanks.
|
 |
Sadanand Murthy
Ranch Hand
Joined: Nov 26, 2003
Posts: 382
|
|
Originally posted by dhriti joshi: I guesss select max is not supported by ejbql. is there any way to do it,like get the entire collection of field and then find max. please help. thanks.
From what I know EJB-QL doesn't support max. I remember that I'd seen some ejb-ql extensions a while ago; but these will be vendor specific. What I'd do in this situation is use jdbc directly to execute select max... statement. Just make sure that you use jdbc connection pool.
|
Ever Existing, Ever Conscious, Ever-new Bliss
|
 |
Sujit udhane
Greenhorn
Joined: Dec 27, 2003
Posts: 4
|
|
In EJB2.1 for EjbQl , Five aggregate functions can be used in the SELECT clause of a EJB QL statement including: COUNT(), MAX( ), MIN( ), AVG( ) and SUM( ). Refer the following link , that may prove helpful http://www.theserverside.com/articles/article.jsp?l=MonsonHaefel-Column5
|
 |
Vishwa Kumba
Ranch Hand
Joined: Aug 27, 2003
Posts: 1064
|
|
thanks Sujit, That's an old article but very informative about EJB-QL for EJB2.1 by RMH
|
 |
 |
|
|
subject: alternate way for using max in ejbql
|
|
|