1 Reply Latest reply on Jun 27, 2012 1:51 PM by james_sutherland

    Order BY clause in JPQL

      Hi all,

      I have a SQL query that works fine in MySQL.

      SELECT e.email FROM Educator e ORDER BY (e.spocInvig + e.educInvig);

      its fetching rows based on the spocinvig and educinvig sum in ascending order.

      but in JPQL i'm getting exception like this.
      Exception Description: Syntax error parsing the query [SELECT e.email FROM Educator e ORDER BY (e.spocInvig + e.educInvig)], line 1, column 41: syntax error at [(].
      Internal Exception: line 1:41: expecting IDENT, found '('

      Can anyone suggest me proper JPQL for the given SQL ?