4 Replies Latest reply on Aug 16, 2002 12:38 PM by l.g.

    Does DinamicQL support  "LIKE"

    l.g.

      This is the error I got:
      [org.jboss.ejb.plugins.cmp.jdbc.JDBCDynamicQLQuery.InvestmentCompany.ejbSelectGeneric] DYNAMIC-QL: SELECT ic.investmentCompanyId FROM InvestmentCompany ic WHERE ic.investmentCompanyTypeCd <> 'D' AND UCASE(ic.investmentCompanyName) like ?1 AND ic.investmentCompanyTypeCd = ?2 ORDER BY ic.investmentCompanyId
      2002-08-15 02:31:44,649 WARN WARNING:javax.ejb.EJBException: Exception in getInvestmentCompanyList():Error while finding InvestmentCompany: Error compiling ejbql: org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "like" at line 1, column 133.
      Was expecting one of:
      "=" ...
      "<>" ...

        • 1. Re: Does DinamicQL support  "LIKE"
          l.g.

          When I modified dynamic query to use literal with "LIKE" it's still give me the same error.
          =============================================
          SELECT ic.investmentCompanyId FROM InvestmentCompany ic WHERE ic.investmentCompanyTypeCd <> 'D' AND UCASE(ic.investmentCompanyName) LIKE 'A%' AND ic.investmentCompanyTypeCd = ?1 ORDER BY ic.investmentCompanyId
          ==============================================
          This is a bug, I think. Is anybody using DynamicQL with "LIKE"? (Is anybody wants to use DynamicQL with "LIKE"?)

          • 2. Re: Does DinamicQL support  "LIKE"
            l.g.

            Forgot to include jboss version:
            3.0.1 Date 200208062340

            TIA

            • 3. Re: Does DinamicQL support  "LIKE"
              dsundstrom

              You can't use a function in the like clause. You should be able to do this, but I forgot to add it to the grammer. Can you file a feature request at source fourge on this?

              • 4. Re: Does DinamicQL support  "LIKE"
                l.g.

                Just did it.