sql - Issues with a query on the AS/400 with LIKE clause -
we using hibernate connect as/400. having issues query on as/400 like
clause.
the following error shown:
java.sql.sqlexception: [sql0131] operands of not compatible or not valid
my query auto generated hibernate:
select tab_parame0_.c1imcd c1_560_, tab_parame0_.c1ninb c2_560_, tab_parame0_.c1jxcd c3_560_, tab_parame0_.c1hltx c4_560_, tab_parame0_.c1hmtx c5_560_, tab_parame0_.c1hdst c6_560_, tab_parame0_.c1ngnb c7_560_, tab_parame0_.c1njnb c8_560_, tab_parame0_.c1nfnb c9_560_, tab_parame0_.c1nhnb c10_560_, tab_parame0_.c1hcst c11_560_ ryc1rep tab_parame0_ lower(tab_parame0_.c1hltx) lower(?) order tab_parame0_.c1imcd asc fetch first 10 rows
sql0131 indicates type mismatch.
what datatype tab_parame0_.c1hltx? datatype query parameter?
please include hql/jpql query source code comparison.
you may have set sql trace see as/400 receiving.
see how obtain trace information java program using toolbox?
i recommend change like lower(:parameter)
like :parameter
in source query , use .tolowercase()
when set parameter , see how works.
Comments
Post a Comment