我想将 oracle 存储过程重写为 java 代码,以在查询字符串中选择具有连接值的数据以比较以下方式:
Query qString =
"SELECT Obj " +
"FROM MyTable Obj2 WHERE ( Obj2.value1 || Obj2.value2 ) in " +
"(SELECT Obj2.value1 || MAX(Obj2.value2) FROM MyTable Obj2 WHERE Obj2.value2 >= :param GROUP BY Obj2.value1) " +
"ORDER BY Obj.value2, Obj.value1";
query = entityManager.createQuery(qString);
query.setParameter("param ", param );
当我在 weblogic 服务器上将查询作为 web 服务运行时,“|”出现错误 特点。我可以用什么来代替 || 运算符得到相同的结果?