Forum: Datenbanken
Delphi
by alex517,
19. Mai 2009
Hallo Heiko,
wenn du mal bei der Abfrage die Bedingung
and ((tree2contact.contact_id=25) or (tree2contact.contact_id is Null))
weglässt, bekommst du folgendes Ergebnis:
NAME ID CONTACT_ID
---------------------------
Forum: Datenbanken
Delphi
by alex517,
19. Mai 2009
SELECT
distinct(tree.name) as name,
tree.id as id,
tree2contact.contact_id as contact_id
from
tree
left join tree2contact on tree.id=tree2contact.tree_id and
((tree2contact.contact_id=25) or (tree2contact.contact_id is Null))
Where
tree.parent=0