PL/SQL (MOSC)

MOSC Banner

I am getting the below error during stored procedure execution through job scheduler.

in PL/SQL (MOSC) 5 commentsAnswered

Oracle DB version 12c

Error: ORA-00932: inconsistent datatypes: expected - got -ORA-06512

The stored procedure is calling the cursor C1 by passing C_ID (NUMBER(10)) inside a for loop in a stored procedure. For Loop statement is exiting with the above error.

Code:

C_ID B.ID%TYPE;

p_id NUMBER;

s_id NUMBER;

CURSOR C1 (ID1 NUMBER) IS
SELECT b.*
FROM A a,
B b,
B c
WHERE b.cov_id = a.cov_id
AND NVL(a.end_date, '31-DEC-2999') > TRUNC(SYSDATE)
AND a.s_id = p_id
AND b.s_id IS NULL
AND a.s_id = p_id

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center