- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
CREATE OR REPLACE FUNCTION "GET_SOTR_FULL_NAME" (sotr_id in number)
RETURN varchar2 IS
cursor surname (sotr_id number)
is
select fc_fam from tsotr
where tsotr.fk_id=sotr_id;
cursor name (sotr_id number)
is
select fc_name from tsotr
where tsotr.fk_id=sotr_id;
cursor patronym (sotr_id number)
is
select fc_otch from tsotr
where tsotr.fk_id=sotr_id;
fio varchar2(90);
fam varchar2(30);
im varchar2(30);
otch varchar2(30);
BEGIN
open surname (sotr_id);
fetch surname into fam;
close surname;
open name (sotr_id);
fetch name into im;
close name;
open patronym (sotr_id);
fetch patronym into otch;
close patronym;
fio:=fam||' '||im||' '||otch;
return fio;
END;