1 Reply Latest reply on Jun 17, 2003 12:23 PM by Pablo Delgado

    problem with SUM with EJB-QL.

    christophe christophe Newbie

      I have the following problem when this request : SELECT SUM(a.basePrice) FROM ProductBean AS a.


      18:30:37,171 ERROR [EntityContainer] Starting failed
      org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT SUM(a.basePrice) FROM ProductBean AS a'; - nested throwable: (org.jboss.ejb.
      lugins.cmp.ejbql.ParseException: Encountered "SUM" at line 1, column 8.
      Was expecting one of:
      "DISTINCT" ...
      "OBJECT" ...
      <NUMERIC_VALUED_PATH> ...
      <STRING_VALUED_PATH> ...
      <DATETIME_VALUED_PATH> ...
      <BOOLEAN_VALUED_PATH> ...
      <ENTITY_VALUED_PATH> ...
      <VALUE_CLASS_VALUED_PATH> ...
      )

      can you help me ?

      Thanks.

      Christophe.