November 15th, 2003, 02:32 PM
i've tried to use "outer joins" with firebird, but it doesnt work correct. Firebird performed an inner join!
SELECT field FROm Tabel1 LEFT JOIN Table2 ON Table1.Key = Table2.Key
Table2 ist empty and the request returnd no rekords.
November 15th, 2003, 04:18 PM
Your example is an inner join!
The syntax for an outer join is:
LEFT OUTER JOIN Table2 ON Table1.Key = Table2.Key;
November 17th, 2003, 02:38 PM
I'm trying to use outer Joins on Firebird, but it seems not to work. My SQL-String was:
SELECT AnyField FROM Table1 LEFT OUTER JOIN Table2 ON Table1.Key = Table2.Key
IMPORTANT: Table2 is empty!
Normaly i should get all Rekords from Table1 (if Table2 is empty).
November 17th, 2003, 04:27 PM
November 18th, 2003, 12:48 AM
even strange, it doesn't work for me
November 18th, 2003, 08:07 AM
what can i do to get all rekords from "Table1" if "Table2" is empty. The Problem is, that i need to join the tablesbecause in "Table2" COULD be an Rekord. :-(
November 20th, 2003, 01:34 PM
I've found the problem! :-)
I've tried the following:
SELECT key from Table1 LEFT OUTER JOIN Table2 ON Table1.key = Table2.key
This didn't work! But if i change it to the following, it works:
SELECT Table1.key FROM Table1 LEFT OUTER JOIN Table2 ON Table1.key = Table2.key
Thanks for helping me! :-)