-- 06_sys_views.sql
-- Create SYS custom views
-- Source: backup/07_sys_views.sql

CREATE OR REPLACE FORCE VIEW "SYS"."VAUTH_SERII" ("ID_PROGRAM", "NUME", "SERIE", "NR_UTIL", "DATA_VAL") AS
select a.id_program,
     a.denumire as nume,
     auth_pack.selecteaza_serie(a.id_program) as serie,
     auth_pack.selecteaza_nr_util(a.id_program) as nr_util,
     auth_pack.selecteaza_data_val(a.id_program) as data_val
from syn_nom_programe a
left join syn_def_programe b on a.id_program = b.ide_program
where b.sters = 0
  and b.instalat = 1;
/
