0 Replies Latest reply on Jul 9, 2003 9:54 AM by Alexey Melnikov

    how to use string functions in EJB-QL

    Alexey Melnikov Newbie

      Hallo all,

      I try to find some entities through query method case insensitivitely, in general sql I'd use pair of UPPER functions but in EJB-QL I should use ucase function, as I understood.

      standardjbosscmp-jdbc.xml have function mapping like:

      But when I try to use it in <ejb-ql><![CDATA[SELECT OBJECT(o) FROM AgendaInstanceEJB o WHERE o.roomId = UCASE(?1)]]></ejb-ql> I get exception in deploy time:

      ...ParseException: Encountered "UCASE" at line 1, column 60.
      Was expecting one of:
      "CONCAT" ...
      "SUBSTRING" ...
      "(" ...
      <STRING_LITERAL> ...

      please, geve me a piece of good advice how use it in right way.

      P.S. I use jboss vestion 3.0.4