Pom19
Z Prirucky
Kontroly existence
select os_cislo, kod, id_vazby, datum from pichacky where id_vazby not in (select id_vazby from prof_vazba)
select os_cislo, kod, id_vazby, datum from pichacky where id_vazby not in
(select id_vazby from prof_vazba where
(dat_od is null or dat_od <= datum) and
(dat_do is null or dat_do >= datum))