Pom19: Porovnání verzí

Z Prirucky
Řádek 8: Řádek 8:
(dat_od is null or dat_od <= datum) and
(dat_od is null or dat_od <= datum) and
(dat_do is null or dat_do >= datum))
(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).

Verze z 3. 2. 2015, 15:09

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).