Hi all,
I am getting exception while tyring to use Aggregate function as
follows in Hibernate3.0.
String SQL_QUERY = "select SUM(price) from
customer_account";
SessionFactory sessionFactory = HibernateUtil.getSessionFactory();
Session session = sessionFactory.openSession();
Query query = session.createSQLQuery(SQL_QUERY);
Configuration Details:
************************
I am using Hibernate3.0 with MYSql Database.
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
<property name="dialect">org.hibernate.dialect.MySQLMyISAMDialect</property>
Exception Got:
*****************
SQLException.(SQLGrammerException)
Note:
******
I am able to run this query successfully when i dont use Aggregate function.
Pls Help me regarding this dialect problem.
Thanks in Advance,
sundar.
|