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 34 35
| create or replace package P1 is
--fonction Dept_ESO : retourne le n° de dept et le libelle de l'Etab
type DeptEso is record ( Departement varchar2(2), Libelle_Etab varchar2(32));
Function Dept_ESO (xEtab varchar2) return DeptEso;
end P1;
create or replace package body P1 is
/*
--=====Departement de l'ESO====
*/
Function Dept_ESO (xEtab varchar2) return DeptEso is r DeptEso;
begin
select substr(mgadr.MGADR_CODPOS, 1, 2),
paesi.paesi_lib
from paesi, paead, mgadr
where paesi.paesi_codext = xEtab
and paead.paesi_num = paesi.paesi_num
and mgadr.mgadr_num = paead.mgadr_num;
return r;
end Dept_ESO;
end P1; |
Partager