Thema: Delphi SQL-Problem mal wieder

Einzelnen Beitrag anzeigen

alex517

Registriert seit: 23. Nov 2004
Ort: Bernau b. Berlin
273 Beiträge
 
Delphi XE5 Enterprise
 
#9

Re: SQL-Problem mal wieder

  Alt 19. Mai 2009, 08:02
SQL-Code:
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
order by
  tree.name
alex
Alexander
  Mit Zitat antworten Zitat