Question:
I’m trying to make outer join by the query builder in Delphi 2.0 but the only active option is inner join. I want to use left outer join and right outer join although I tried to use Paradox, Dbase, and Interbase.
How can I create UNION query in Delphi 2.0?
Answer:
Delphi LocalSQL uses most of the ANSI SQL92 standard, but as far as I know, Delphi 2.0’s version of Local SQL doesn’t support UNION queries. But you mention that you want to do LEFT OUTER JOIN and RIGHT OUTER JOIN queries? No problem. Here’s some sample syntax:
//Left outer joinSELECT D.*FROM “Table1.db” D LEFT OUTER JOIN “Table2.DB” D1 ON (D1.FldID = D.FldID)//Right outer joinSELECT D.*FROM “Table1.db” D RIGHT OUTER JOIN “Table2.DB” D1 ON (D1.FldID = D.FldID)Try this out in the Database Desktop. It should work.