Procédure : replace de chaine de caractères
salut a tous
j'ai le code suivant :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| create or replace procedure replacee is
cursor cur is select code from EMPLOYÉS for update of tel;
vp varchar2(4);
vd varchar2(4);
tele varchar2(20);
begin
for vcur in cur loop
select substr(tel,0,2) into vp from EMPLOYÉS where vcur.code=code;
select substr(tel,3,10) into vd from EMPLOYÉS where vcur.code=code;
if vp ='05' then
tele :=concat('03',vd);
update EMPLOYÉS set tel=tele where current of cur;
end if;
if vp ='03' then
tele :=concat('02',vd);
update EMPLOYÉS set tel=tele where current of cur;
end if;
end loop;
end replacee; |
quand j’exécute
execute procedure replacee(); :
errreur
Citation:
ORA-06550: Ligne 1, colonne 7 :
PLS-00103: Symbole "PROCEDURE" rencontré à la place d'un des symboles suivants :
begin case declare exit for goto if loop mod null pragma
raise return select update while with <identificateur>
<identificateur entre guillemets> <variable bind> << close
current delete fetch lock insert open rollback savepoint set
sql execute commit forall merge pipe
Symbole "PROCEDURE" n'a pas été pris en compte.