Registriert seit: 5. Nov 2004
Ort: Coesfeld
1.268 Beiträge
Delphi 2010 Professional
|
Re: Frage zu SQL Komma-Join
17. Mai 2009, 13:34
SQL-Code:
SELECT n.recipient,n.start_date, c.contact_id, c.send_date
FROM correspondence c
LEFT JOIN (SELECT FIRST 0 * FROM notes) n
ON 1 = 1
WHERE c.contact_id = 22
UNION
SELECT n.recipient,n.start_date as sortdate, c.contact_id, c.send_date as sortdate
FROM notes n
LEFT JOIN (SELECT First 0 * FROM correspondence) c
ON 1 = 1
WHERE n.recipient = 22 order by sortdate
Das mag er aber nicht. Wo ist denn da der Fehler
|