ora-06553 pls-306调用'ogc_x'的参数数量或类型错误 [英] ora-06553 pls-306 wrong number or types of arguments in call to 'ogc_x'
问题描述
我正在尝试在oracle 10g中进行查询.它是这样的:
I´m trying a query in oracle 10g. It goes like this:
SELECT
*
FROM
h2h_reg reg,
h2h_cat_estatus est
WHERE
reg.FECH_APLICACION = SYSDATE
AND REG.ID_EST = EST.ID_ESTATUS
AND est.tipo_estatus = "X";
因此它运行流畅,但是当我尝试通过以下方式添加组时:
So it runs smootly, but when I try it adding a group by:
SELECT
reg.id_arch,
reg.id_prod
FROM
h2h_reg reg,
h2h_cat_estatus est
WHERE
reg.FECH_APLICACION = SYSDATE
AND reg.id_est = est.id_estatus
AND EST.TIPO_ESTATUS = "X"
GROUP BY
reg.id_arch,
reg.id_prod;
我收到下一条消息:
ora-06553 pls-306调用'ogc_x'时参数或类型错误
ora-06553 pls-306 wrong number or types of arguments in call to 'ogc_x'
有人知道我的查询出了什么问题吗?
Does anyone knows what´s wrong in my query?
推荐答案
您在"X"
上使用了双引号.
这应该是'X'
.
X对象是MDSYS模式中的函数"ogc_x",因此当您说est.tipo_estatus = "X"
而不是正确的est.tipo_estatus = 'X'
时,它会被翻译(因为"是标识符,所以"X"是相同的就像在est.tipo_estatus = mdsys.ogc_x
上键入X)一样,当然会失败.
the X object is an function in the MDSYS schema, "ogc_x", so when you say est.tipo_estatus = "X"
instead of the correct est.tipo_estatus = 'X'
it gets translated (as "" is as an identifier so "X" is the same as just typing X) to est.tipo_estatus = mdsys.ogc_x
and of course fails.
这篇关于ora-06553 pls-306调用'ogc_x'的参数数量或类型错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!