Oracle - ERROR PLS-00103

 
Vista:

ERROR PLS-00103

Publicado por monica (2 intervenciones) el 13/01/2007 21:44:52
HOLA!! TENGO UN PROBLEMA, MI PROCEDURE ES EL SIGUIENTE:
CREATE OR REPLACE PROCEDURE VALIDACION_NUMERO_CASO (p_NumeroCaso CHAR) AS
num_caso char(18);
/******************************************************************************
NAME: FISICO_MORAL
PURPOSE:

REVISIONS:
Ver Date Author Description
--------- ---------- --------------- ------------------------------------
1.0 07/06/2006 Mónica Alavez Este procedure nos regresa un valor que
nos dice si la persona es física dependiendo
de la longitud del RFC.

NOTES:

Automatically available Auto Replace Keywords:
Object Name: FISICO_MORAL
Sysdate: 07/06/2006
Date and Time: 07/06/2006, 05:49:44 p.m., and 07/06/2006 05:49:44 p.m.
Username: (set in TOAD Options, Procedure Editor)
Table Name: (set in the "New PL/SQL Object" dialog)

******************************************************************************/
BEGIN
DECLARE
CURSOR CURSOR6 IS
SELECT (NUMERO_DE_CASO) p_num_caso FROM SYSADM.DECLARACIONES_MENSUALES;

BEGIN
FOR C6 IN CURSOR6 LOOP
num_caso := C6.p_num_caso;
IF p_NumeroCaso IN (num_caso) OR (num_caso) IS NULL
THEN
fecha_error := SYSDATE;
INSERT INTO MONITOR_ERROR (FECHA_ERROR) VALUES (fecha_error);
UPDATE SYSADM.XML_ACUSE
SET fecha_procesado = SYSDATE
WHERE CURRENT OF CURSOR6;
END IF;
END LOOP;

END VALIDACION_NUMERO_CASO;
/

Y AL COMPILARLO ME MANDA ESTE ERROR:
PLS-00103 found 'string' but expected one of the following: 'string'"},

Cause: This error message is from the parser. It found a token (language element) that is inappropriate in this context.

Action: Check previous tokens as well as the one given in the error message. The line and column numbers given in the error message refer to the end of the faulty language construct.


YA INTENTE MUCHAS COSAS Y NO LE ENCUENTRO SOLUCION, SI PUDIERAN AYUDARME SE LOS AGRADECERIA.
SALUDOS
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:ERROR PLS-00103

Publicado por Hector (127 intervenciones) el 15/01/2007 02:57:00
Hola... se me ocurren algunas ideas, lo hago de memoria, porque estoy reinstalando mi PC y no tengo todavia donde probar.
La pirmera, en el cursor:

CURSOR CURSOR6 IS
SELECT (NUMERO_DE_CASO) p_num_caso FROM SYSADM.DECLARACIONES_MENSUALES;

No veo que uso le das al parametro NUMERO_DE_CASO, me imagino que querrias usarla en la clausula where, pero no lo hiciste, puede ser que eso este dandole problemas al compilador.

En esta no estoy muy seguro:

UPDATE SYSADM.XML_ACUSE
SET fecha_procesado = SYSDATE
WHERE CURRENT OF CURSOR6;

No se si debes decir WHERE CURRENT OF CURSOR6 o WHERE CURRENT OF C6

En el If:
IF p_NumeroCaso IN (num_caso) OR (num_caso) IS NULL
THEN

Tal vez te queda mejor, mas claro y tal vez el error este alli asi:
IF (p_NumeroCaso IN (num_caso)) OR (num_caso IS NULL)
THEN

Y si puedo ofrecerte un consejo te diria que uses sangrias para delimitar tus bloques y asi poder saber que esta adentro de los otros, es mas facil para el proceso de debug.

Ojala te haya ayudado, y si no, o tienes mas dudas, vuelve a escribir al foro o a mi correo.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar