Ich habe diese Anfrage:0 = (Wählen Sie die Anzahl (h.id_h) aus Haus h, wobei h.id_h = lp.id_h UND h.id_none = '1') Bedeutung?
select lp.id_line
from Line lp,
Enter eta
WHERE lp.date_line <= sysdate
AND lp.status = 10
AND 0 = (select count(h.id_h) from House h where h.id_h = lp.id_h AND h.id_none = '1')
AND lp.et_code = eta.et_code
AND (eta.et_block <> '1' or eta.et_block is null)
and eta.par_code In ('DC46004');
Allerdings verstehe ich nicht, was das Teil:
AND 0 = (select count(h.id_h) from House h where h.id_h = lp.id_h AND h.id_none = '1')
tut. Die Linie
select count(h.id_h) from House h where h.id_h = lp.id_h AND h.id_none = '1'
kehrt 7 als Ergebnis. Bitte helfen ...
Nur eine Notiz, 'DISTINCT' ist keine Funktion! I.e. Du machst tatsächlich 'COUNT (DISTINCT sal)'. – jarlh