PL/SQL error in Oracle Application Express -
i trying make package in oae, function, procedure , cursor. when trying run it, have following error
error @ line 21: pls-00103: encountered symbol "cursor" when expecting 1 of following: end not pragma final instantiable order overriding static member constructor map
this si code:
create or replace package packageproiect procedure del_banca ( p_banid.id_banca%type) begin delete banci_pnu id_banca=p_banid; if sql%notfound raise_application_error(-20203, 'nicio banca nu fost stearsa din baza de date'); end if; end del_banca; begin packageproiect.creste_credit(1,20,'ipotecar'); end; function formatnume (p_nume in varchar, p_prenume in varchar) return varchar begin return p_nume || ' ' || p_prenume; end; cursor c_toticlientii select nume,prenume clienti v_formatarenume varchar(70); begin v_clientrecord in c_toticlientii loop v_formatarenume := formatnume(v_clientrecord.nume, v_clientrecord.prenume); insert temp_table(fname) values (v_formatarenume); end loop; end formatnume; commit; end;
what doing wrong here? thank you!
declare cursor in package spec on top, i.e. before declaration of functions , procedures.
the same order applies anonymous block.
i wrote article here http://lalitkumarb.com/2014/07/07/order-of-item-list-in-declaration-part-of-plsql-anonymous-block-pls-00103/
following order of item list in declaration part :
item list of variables, cursors, types, subtypes, constants etc.
functions.
procedures.
Comments
Post a Comment