gpt4 book ai didi

sql - 0RA-00952 与 Oracle 10g 的内部连接

转载 作者:行者123 更新时间:2023-12-02 03:54:50 27 4
gpt4 key购买 nike

这个有效:

SELECT
PRODUCT_INFOS.FIELD_VALUE,
PRODUCT_INFOS.COIL_ID_SYSTEM,
PRODUCT_INFOS.TIME_STAMP,
PRODUCT_INFOS.FIELD_NAME
FROM
PRODUCT_INFOS

这个有效:

SELECT
COIL_INFOS.TIME_STAMP,
COIL_INFOS.IN_THICKNESS,
COIL_INFOS.MEASURED_LENGTH,
COIL_INFOS.MEASURED_WIDTH,
COIL_INFOS.PARAM_SET_TOP_SIDE,
COIL_INFOS.PARAM_SET_BOTTOM_SIDE,
COIL_INFOS.TIME_STAMP,
COIL_INFOS.COIL_ID_SYSTEM
FROM
COIL_INFOS
WHERE
(COIL_INFOS.COIL_ID_SYSTEM LIKE '14051800' OR COIL_INFOS.COIL_ID LIKE '14051800')

这适用于 Oracle 11g,但在 10g(版本 10.2.0)上失败并显示 0RA-00952 - 表或 View 不存在:

SELECT
PRODUCT_INFOS.FIELD_VALUE,
COIL_INFOS.TIME_STAMP,
COIL_INFOS.IN_THICKNESS,
COIL_INFOS.MEASURED_LENGTH,
COIL_INFOS.MEASURED_WIDTH,
COIL_INFOS.PARAM_SET_TOP_SIDE,
COIL_INFOS.PARAM_SET_BOTTOM_SIDE
FROM
COIL_INFOS
INNER JOIN
PRODUCT_INFOS
on PRODUCT_INFOS.COIL_ID_SYSTEM=COIL_INFOS.COIL_ID_SYSTEM
and PRODUCT_INFOS.TIME_STAMP=COIL_INFOS.TIME_STAMP
and PRODUCT_INFOS.FIELD_NAME='ID bobina'
WHERE
(COIL_INFOS.COIL_ID_SYSTEM LIKE '14051800' OR COIL_INFOS.COIL_ID
LIKE '14051800')

除了 Oracle 的版本(基础是使用相同的转储创建的)之外,我没有看到其他区别。由于我怀疑 Oracle 10g 中存在错误,因此我会接受与该问题明确相关的错误报告作为答案。

当然也可以接受直接解决方案或变通方法。

最佳答案

我不会很快接受我自己的回答。欢迎提交更准确的报告,尤其是当您发现来自 Oracle 的公开错误报告时。

我找到了解决方法:

SELECT
PRODUCT_INFOS.FIELD_VALUE,
COIL_INFOS.TIME_STAMP,
COIL_INFOS.IN_THICKNESS,
COIL_INFOS.MEASURED_LENGTH,
COIL_INFOS.MEASURED_WIDTH,
COIL_INFOS.PARAM_SET_TOP_SIDE,
COIL_INFOS.PARAM_SET_BOTTOM_SIDE
FROM
COIL_INFOS, PRODUCT_INFOS
WHERE
PRODUCT_INFOS.COIL_ID_SYSTEM=COIL_INFOS.COIL_ID_SYSTEM
and PRODUCT_INFOS.TIME_STAMP=COIL_INFOS.TIME_STAMP
and PRODUCT_INFOS.FIELD_NAME='ID bobina'
and (COIL_INFOS.COIL_ID_SYSTEM LIKE '14051800' OR COIL_INFOS.COIL_ID
LIKE '14051800')

同一查询的这种简化语法在 10g 服务器上确实有效。我更倾向于认为使用的 10g 版本有问题。

关于sql - 0RA-00952 与 Oracle 10g 的内部连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13117528/

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