Q: SQL-INNER JOIN and Paradox Tables

In article <1995Sep26.134108.28...@news.fh-friedberg.de>
           ark...@monet.fh-friedberg.de "Andreas Kloes" writes:

> Hi folks....

> I have a problem by using INNER JOINS and Paradox 4.0 Tables.... :-(
> What i have is a Database in 4 tables. In the first table are more then
> 20 Fields in each record. Three of these fields are pointer to oner of the
> other tables. e.G. Table1.Host is 5 then in Table Host the No (5) field is
> the JOIN!!! and in field Command is the data i want to show in the
> data-grid. So i use a TQuery object to do this.
> SQL:  SELECT Table1.<what i want>,...., Host.Command
>       D.Host = D1.No
>       ORDER BY
>       D1.Command

> Works fine !? But when i try to use a second INNER JOIN command in the same
> query it whont work.
> Pls. tell mit the hint.... or e-mail me a example which works .....
> or wher in the handbooks i can find these shit.....

Using the supplied databases in DBDEMOS I got the below SQL to run and provide
the results as expected.

  SELECT * FROM orders, customer, employee,
  orders JOIN customer ON orders.custno = customer.custno,
  orders JOIN employee ON orders.empno = employee.empno

Watch out for the commas after the tables, as well as at the end of each join
clause. I think they are required. They certainly are in other versions of
SQL. (INNER is the default JOIN so it is not required).

The Borland manuals on SQL, particularly on JOINs, is very sparse - and the
online help is no better.

 Richard Linsley Hood | Poole, Dorset UK | email: richar...@dakal.demon.co.uk
 "Programming is mirroring the world, inside a computer"   Larry O'Brien 1991