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;
I get the next message:
ora-06553 pls-306 wrong number or types of arguments in call to 'ogc_x'
Does anyone knows what´s wrong in my query?
DISTINCT
since you're not using any aggregates. – Kageraogc_x
) that doesn't appear anywhere in your query? Are you sure that the query you posted and the error that you posted go together? Is one of the objects in theFROM
clause a view that references theogc_x
function? Also, strings in Oracle are enclosed in single quotes not double quotes. If you used= "X"
in Oracle, that would generate a syntax error. It would be a different syntax error from the one you posted, though. – Leg