本文介绍了0RA-00952关于与Oracle 10g进行内部联接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这有效:

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 - Table or view does not exist失败:

This works on Oracle 11g but fails with 0RA-00952 - Table or view does not exist on 10g (version 10.2.0) :

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中的错误时,我接受与该问题明显相关的错误报告作为答案.

I see no other difference than the version of Oracle (the bases are created using the same dump). As I suspect a bug in Oracle 10g, I'd accept as answer a bug report clearly related to the problem.

当然也可以接受直接的解决方案或解决方法.

Of course a direct solution or a workaround would be accepted too.

推荐答案

我不会很快接受我自己的答案.随时提交更精确的报告,尤其是当您从Oracle找到公开的错误报告时.

我找到了一种解决方法:

I found a workaround :

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版本存在越野车的看法有更多的了解.

This simplified syntax for the same query does work on the 10g server. I'm more on more on the opinion the used 10g version is buggy.

这篇关于0RA-00952关于与Oracle 10g进行内部联接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 09:28