gpt4 book ai didi

java - Hibernate JPA 中的案例声明

转载 作者:行者123 更新时间:2023-11-30 08:15:54 25 4
gpt4 key购买 nike

我收到以下错误,有人可以帮助我吗?

2015-04-16 12:17:26,330 ERROR [http-8080-Processor23] ErrorCounter - line 1:225: unexpected token: -
2015-04-16 12:17:26,345 ERROR [http-8080-Processor23] ErrorCounter - line 1:253: unexpected token: else
2015-04-16 12:17:26,345 ERROR [http-8080-Processor23] ErrorCounter - line 1:327: expecting CLOSE, found '.'

这是我的查询..

public List<DwnGactABForFile> getDwnGactABForFile(String sqlCrit)
throws DataAccessException {
String sql = "select new com.compass.beactive.vo.DwnGactABForFile(a.gaaAccnum, a.gaaSrccode, a.gaaBuysellcode, b.gabScnetamt, a.gaaProcessdate,"
+ " (case when cast (a.gaaTransnetamt as float) = 0 then (cast(replace(a.gaaTransmarketvalue ,'-','0') as decimal(15,2))) else (cast(replace(a.gaaTransnetamt,'-','0') as decimal(15,2)))end)as a.gaaTransnetamt,"
+ " b.gabTradecurrcode, b.gabDescline01, b.gabDescline02, b.gabDescline03, "
+ " b.gabDescline04, b.gabDescline05, b.gabDescline06, b.gabDescline07, b.gabDescline08, b.gabDescline09, b.gabDescline10,"
+ " b.gabDescline11, b.gabDescline12) "
+ " from DwnGactA a, DwnGactB b "
+ " where a.gaaIdent = b.gabIdent "
+ " and a.gaaIdseqnum = b.gabIdseqnum "
+ sqlCrit
+ " order by a.gaaProcessdate ";
Query query = this.entityManager.createQuery(sql);
System.out.println("Full sql query" +sqlCrit);
return query.getResultList();

最佳答案

这解决了上述问题

COALESCE(NULLIF(a.gaaTransnetamt, '0.000'), a.gaaTransmarketvalue)

关于java - Hibernate JPA 中的案例声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29681877/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com