PLS-00386

Error: PLS-00386: type mismatch found at 'string' between FETCH cursor and INTO variables

Causa: An assignment target in the INTO list of a FETCH statement does not match in datatype with the corresponding column in the select list of the cursor declaration, and it is unclear which implicit conversion is required to correct the mismatch.

Acción: Change the cursor declaration or change the datatype of the assignment target. You might want to use datatype conversion functions in the select list of the query associated with the cursor.

COMENTARIOS:

por Sergio | 11/04/2012 18:06:19

RE: PLS-00386

Hola: estoy teniendo un error al compilar el siguiente store procedure:
CREATE OR REPLACE PROCEDURE ID_PYP
AS
TYPE matriz_rowid IS TABLE OF ROWID;
TYPE matriz_ID IS TABLE OF MIGRA_DEUDA_PYP.ID%TYPE;

CURSOR CUR IS SELECT ID
FROM MIGRA_DEUDA_PYP
ORDER BY P_INSC,P_BISS,P_POSI;
m_rowid matriz_rowid;
m_id matriz_ID;
CONTADOR NUMBER := 100;


BEGIN

OPEN CUR;

LOOP

FETCH CUR BULK COLLECT
INTO m_rowid,m_ID LIMIT CONTADOR;
FOR i IN 1..m_rowid.count
LOOP

m_ID(i) := IDPYP.NEXTVAL ;

END LOOP;

FORALL i IN 1..m_rowid.count
UPDATE MIGRA_DEUDA_PYP
SET ID = m_ID(i)
WHERE rowid = m_rowid(i);
EXIT WHEN cur%NOTFOUND;

END LOOP;
CLOSE CUR;
END;
/

Estoy trabajando con Oracle 10g, y el error que me da es :

PLS-00386: type mismatch found at "M_ROWID" between FETCH cursor and INTO variables
Agradeceria cualquier ayuda al respecto
Muchas gracias