Pom19: Porovnání verzí

Z Prirucky
Řádek 1: Řádek 1:
== Kontroly existence ==
== 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, 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));


select id, os_cislo, cislo_pom, id_vazby, id_smen_pol, hodiny, den from smenovnice A where 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.den) and
(B.dat_do is null or B.dat_do >= A.den));


select os_cislo, kod, id_vazby, datum from pichacky where id_vazby not in
* Uváděná vazba v agendě Zpracování brutto (pichacky) buď neexistuje v agendě Profese-vazba, nebo není platná (datum od, datum do).
(select id_vazby from prof_vazba where
* Uváděná vazba v agendě Pořizování směn (smenovnice) buď neexistuje v agendě Profese-vazba, nebo není platná (datum od, datum do).
(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).

Verze z 3. 2. 2015, 15:18

Kontroly existence

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));
select id, os_cislo, cislo_pom, id_vazby, id_smen_pol, hodiny, den from smenovnice A where 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.den) and
(B.dat_do is null or B.dat_do >= A.den));
  • Uváděná vazba v agendě Zpracování brutto (pichacky) buď neexistuje v agendě Profese-vazba, nebo není platná (datum od, datum do).
  • Uváděná vazba v agendě Pořizování směn (smenovnice) buď neexistuje v agendě Profese-vazba, nebo není platná (datum od, datum do).