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))
select os_cislo, cislo_pom, kod, id_vazby, datum from pichacky A where id_vazby is not null
and id_vazby not in
(select id_vazby from prof_vazba B where
B.os_cislo = A.os_cislo and
B.cislo_pom = A.cislo_pom and
(B.dat_od is null or B.dat_od <= A.datum) and
(B.dat_do is null or B.dat_do >= A.datum))
Uváděná vazba v agendě Zpracování brutto (pichacky) buď neexistuje v agendě Profese-vazba, nebo není platná (datum od, datum do).