gpt4 book ai didi

java.sql.SQLException : ORA-00900: invalid SQL statement in Ecllips 异常

转载 作者:行者123 更新时间:2023-11-30 06:13:47 29 4
gpt4 key购买 nike

我正在尝试从 Ecllips 执行以下查询,但出现以下错误。

rs = stmt.executeQuery("select"
+"sum(pr.amount)"
+"from trans_log tl,"
+"payment_detail pp,"
+"pft_trans_reltn pr,"
+"pft_encntr pe,"
+"encounter e,"
+"account a"
+"where"
+"pr.beg_effective_dt_tm >= TO_DATE('01/JUN/2015 00:00:00', 'dd/mm/yy hh24:mi:ss') AND pr.beg_effective_dt_tm <= TO_DATE('30/JUN/2015 23:59:59', 'dd/mm/yy hh24:mi:ss')"
+"and pp.payment_detail_id=tl.payment_detail_id"
+"and tl.activity_id=pr.activity_id"
+"and tl.active_ind=1"
+"and tl.trans_type_cd=10982.00"
+"and pr.parent_entity_name='PFTENCNTR'"
+"and pe.pft_encntr_id=pr.parent_entity_id"
+"and a.acct_id=pe.acct_id"
+"and a.acct_type_cd=649377.00"
+"and pe.encntr_id=e.encntr_id"
+"and e.organization_id=589723.00");

我已经按照这篇文章中的建议进行了尝试 Oracle Post Link

我无法弄清楚我哪里出错了。

我尝试添加单引号,但同样的错误:

pr.beg_effective_dt_tm >= TO_DATE(\"01/JUN/2015 00:00:00\", \"dd/mm/yy hh24:mi:ss\")

Errr:java.sql.SQLException: ORA-00900:

最佳答案

在每一行添加空格。尝试这样使用:

rs = stmt.executeQuery("select"
+" sum(pr.amount)"
+" from trans_log tl,"
+" payment_detail pp,"
+" pft_trans_reltn pr,"
+" pft_encntr pe,"
+" encounter e,"
+" account a"
+" where"
+" pr.beg_effective_dt_tm >= TO_DATE('01/JUN/2015 00:00:00', 'dd/mm/yy hh24:mi:ss') AND pr.beg_effective_dt_tm <= TO_DATE('30/JUN/2015 23:59:59', 'dd/mm/yy hh24:mi:ss')"
+" and pp.payment_detail_id=tl.payment_detail_id"
+" and tl.activity_id=pr.activity_id"
+" and tl.active_ind=1"
+" and tl.trans_type_cd=10982.00"
+" and pr.parent_entity_name='PFTENCNTR'"
+" and pe.pft_encntr_id=pr.parent_entity_id"
+" and a.acct_id=pe.acct_id"
+" and a.acct_type_cd=649377.00"
+" and pe.encntr_id=e.encntr_id"
+" and e.organization_id=589723.00");

关于java.sql.SQLException : ORA-00900: invalid SQL statement in Ecllips 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31446341/

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