1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| DECLARE
v_decision acces.decision%type;
a varchar2(100);
b varchar2(100);
cursor couper_cursor is
select decision
from acces
where :global.nom=nom and :global.prenom=prenom and :B2.code=code;
BEGIN
open couper_cursor;
loop
fetch couper_cursor into v_decision;
exit when couper_cursor%notfound;
end loop;
close couper_cursor;
b := user;
if b='SPECIAL' then v_decision := 'O';
end if;
if v_decision = 'I' then
message('VOTRE DEMANDE EST EN INSTANCE' );
message('VOTRE DEMANDE EST EN INSTANCE' );
elsif v_decision = 'N'then
message('VOTRE DEMANDE A ETE REFUSEE ' );
message('VOTRE DEMANDE A ETE REFUSEE' );
elsif v_decision = 'O'then
a:='cmd /C start'||:B2.dossier||:B2.fichier;
host(a);
else
insert into acces(nom,prenom,grade,unite,service,code_document,decision)
values(:global.nom,:global.prenom,:global.grade,:global.unite,:global.service,:B2.code,'I');
commit;
end if;
END; |
Partager