1 Reply Latest reply on Feb 16, 2006 5:09 AM by Emmanuel Bernard

    Subquery problem in EJB-QL for Jboss4.0.3

    Mihir Shelat Newbie


      Currently I am facing a problem in writing a subquery in ejb-ql in Jboss4.0.3. By providing 2 params (Integer & Timestamp) my query looks something like this:

      SELECT OBJECT(tb1)
      FROM table1 tb1
      WHERE tb1.integer_data = ?1 and
      tb1.timestamp_data =
      (SELECT min(tb2.timestamp_data)
      FROM table2 tb2
      WHERE tb2.integer_data = ?1 and
      tb2.timestamp_data > ?2 )

      The Exception that I am getting is:

      org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "(" at Line 1, column 109
      Was expecting one of:

      Note: I have changed the <suquery-supported> flag to true, in standardjboss.xml. And I am also getting the same error with Jboss 4.0.4.

      Kindly let me know if anyone has the answer to this.

      Thanks & Regards,