Foros del Web » Programación para mayores de 30 ;) » Bases de Datos General » Oracle »

error pls-00103

Estas en el tema de error pls-00103 en el foro de Oracle en Foros del Web. hola tngo esta funcion y me tira error en "declare" El error que me dice es "Compilation errors for FUNCTION DOO_PAMPA.MERGEBUS Error: PLS-00103: Encountered the ...
  #1 (permalink)  
Antiguo 27/03/2007, 06:59
 
Fecha de Ingreso: septiembre-2004
Mensajes: 92
Antigüedad: 19 años, 7 meses
Puntos: 0
error pls-00103

hola tngo esta funcion y me tira error en "declare"
El error que me dice es
"Compilation errors for FUNCTION DOO_PAMPA.MERGEBUS

Error: PLS-00103: Encountered the symbol "DECLARE" when expecting one of the following:
begin function package pragma procedure subtype type use
<an identifier> <a double-quoted delimited-identifier> form
current cursor external language
The symbol "begin" was substituted for "DECLARE" to continue.
Line: 5
Text: Declare"


CREATE OR REPLACE FUNCTION MergeBUs(P_PC_ID Pc_Main.Pc_Id%type)
RETURN varchar2
AS

Declare
P_result varchar2(150);
P_reader varchar2(50);
Cursor region_cursor IS
SELECT DISTINCT BUS_BusinessUnits.BUS_Name
FROM GAPS_BDI_BillingData, BUS_BusinessUnits
WHERE GAPS_BDI_BillingData.PC_ID=P_PC_ID and
BUS_BusinessUnits.BUS_ID=GAPS_BDI_BillingData.BUS_ ID;
Begin
OPEN region_cursor;
FETCH region_cursor INTO P_result;
loop
FETCH region_cursor INTO P_reader;
P_result:=P_result + ', ' + P_reader;
exit when region_cursor%notfound;
end loop;
CLOSE region_cursor;
return P_result;
end;
end;
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:42.