Aggregate functions in DODS
[email protected] Wed, 06 Apr 2005 10:56:18 +0200
| Newsgroups | gmane.comp.java.enhydra.dods |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format...
------------=_1112777784-21364-18
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I have this problem with aggregate function made via DODS:
If I print final SQL - via query.debug() -
I get - SELECT sum(amount) FROM Person - which is OK.
But dbQuery.next always returns null. Why?
How could I implement these aggregate functions if this is not the right way.
My code: DBQuery dbQuery = null;
QueryBuilder query = null;
Object obj = null;
PersonQuery origQuery = new PersonQuery();
query = origQuery.getQueryBuilder();
query.setSelectClause(" sum(amount) as \"suma\" ");
dbQuery = PersonDO.createQuery();
query.debug();
dbQuery.query(query);
obj = dbQuery.next();
Thank you for your help.
------------=_1112777784-21364-18
Content-Type: text/plain; name="message.footer"
Content-Disposition: inline; filename="message.footer"
Content-Transfer-Encoding: 8bit
--
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
------------=_1112777784-21364-18--