Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Relational Databases
Expertise: Beginner
Aug 26, 1998

Related Database

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 join
SELECT D.*
FROM "Table1.db" D LEFT OUTER JOIN "Table2.DB" D1
  ON (D1.FldID = D.FldID)

//Right outer join
SELECT 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.
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date