You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
786 B
29 lines
786 B
#Parameter1:Datum von:datetime:now
|
|
#Parameter2:Datum bis:datetime:now
|
|
|
|
drop table if exists tmp1;
|
|
drop table if exists tmp2;
|
|
drop table if exists tmp3;
|
|
drop table if exists tmp4;
|
|
|
|
|
|
SELECT
|
|
zahlung.Valuta,
|
|
faktura.Nrfaktura,
|
|
privat.NRPRIVAT,
|
|
privat.NAME,
|
|
privat.VORNAME,
|
|
konto.Konto,
|
|
zahlung.betrag
|
|
FROM
|
|
zahlung
|
|
INNER JOIN faktura ON (zahlung.Nrfaktura = faktura.Nrfaktura)
|
|
INNER JOIN behandlu ON (faktura.Nrbehandlung = behandlu.Nrbehandlung)
|
|
INNER JOIN privat ON (behandlu.Nrpatient = privat.NRPRIVAT)
|
|
INNER JOIN konto ON (zahlung.Nrkonto = konto.Nrkonto)
|
|
where (konto.nrkonto <> 1 and konto.nrkonto <> 2 and konto.nrkonto <> 4 and konto.nrkonto <> 7 and konto.nrkonto <> 14)
|
|
and (valuta >= '#Parameter1') AND (valuta < '#Parameter2')
|
|
and zahlung.status<>9
|
|
|
|
|
|
|