How-To select on a "group" function
"Francesco Martinelli" <[email protected]>
| Newsgroups | gmane.comp.jakarta.ojb.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, I would like to retrieve a record using the following SQL-Like statement: "select max(value) from " + className Does anyone know how to "convert" this to OQL? I know it would be possible to retrieve all the records, then sort them out, and pick up the first, but I would prefer to reduce the amount of data retrieved from the database. I also wonder if it were possible to order the "resultset" according to one field, e.g. of SQL-like would be: "select xxx from " + className + " order by value". Thenk you, Francesco.