gpt4 book ai didi

java - informix 数据库中没有指定的表(t_all)?

转载 作者:搜寻专家 更新时间:2023-10-30 23:26:41 25 4
gpt4 key购买 nike

我正在使用 Jdbctemplate 通过 spring 执行查询。我的数据库是informix。当我执行查询时出现以下错误。

指定的表(t_all)不在数据库中。

我认为这是因为 session 断开,最终临时表已经消失,但我不知道如何修复它。

有谁知道真正的原因是什么以及如何解决这个问题?

SELECT
mutto ,
apto ,
over ,
brrnon ,
katy ,
sum(e_b-e_re+aan) nettito
FROM muttito_new
WHERE
aar = 2019 AND
aand = 04 AND
jd = 1 AND
vpl_vr = 1 AND (bro < 500 and (mutto < 751 or (mutto > 900 and mutto < 952))) GROUP BY 1,2,3,4,5
INTO TEMP t_all;
SELECT mutto aluta,
sum(nettito) nettitos
FROM t_all
GROUP BY 1 INTO TEMP t_sel;


jdbcTemplate.execute(selectieQuery());

最佳答案

显然,您的 SQL 字符串上的每个语句都是在它自己的连接上执行的(对此我不确定,我不是 Spring 专家)。检查using Spring JdbcTemplate for multiple database operations他们建议使用交易的地方。

关于java - informix 数据库中没有指定的表(t_all)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56291109/

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