Check these change notes. EJB2.1 is not yet supported but you can do it in JBossQL in 3.2 and HEAD.
[ 794199 ] Functions in SELECT clause http://sourceforge.net/tracker/?func=detail&aid=794199&group_id=22866&at id=381174 [ 815115 ] JBossQL: SUM, AVG, MAX, MIN http://sourceforge.net/tracker/?func=detail&aid=815115&group_id=22866&at id=381174 > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Darren Hartford > Sent: Thursday, January 08, 2004 4:45 PM > To: [EMAIL PROTECTED] > Subject: [JBoss-user] jboss4 and EJB2.1 ejb-ql? > > Hey all, > Grabbed a snapshot of 4.0DR3 as it is the most recent to see > if the aggregate functions defined in EJB2.1 are ready to go. > Unfortunately, this query did not work or my code is wrong. > > EJB-QL > "SELECT SUM(o.amountpaid) FROM MyTable AS o" > Jboss-QL > "SELECT SUM(o.amountpaid) FROM MyTable AS o" > > It gives the the error: > 09:34:36,460 ERROR [STDERR] > org.jboss.ejb.plugins.cmp.ejbql.ParseException: FROM not found > 09:34:36,460 ERROR [STDERR] at > org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.p > arse(EJBQLParser.java:38) > 09:34:36,460 ERROR [STDERR] at > org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompi > ler.compileEJBQL(JDBCEJBQLCompiler.java:146) > 09:34:36,460 ERROR [STDERR] at > org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery > .<init>(JDBCEJBQLQuery.java:42) > > > Any ideas please? > -D > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System > offering advanced branching capabilities and atomic changes > on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user