Darryl,
In Postgres, neither the parentheses nor the word "INNER" are required. Youwill significantly simplify your life if
youget rid of them, and clean upyour presentation of SQL text in order to debug your own joins.
One significant MSAccess <==> Postgres conflict is that Postgres assumes thatparens in the FROM clause represent
subselects(I think), while MS Access usesparens to organize JOINs. Postgres behavior is, of course, more
SQL92correct.
SELECT orderlines.quantity, products.productname, products.productcost,customers.custlname,customers.custfname
FROM orders JOIN orderlines ON orders.orderid = orderlines.lnkorderid JOIN customers ON customers.custid =
orders.lnkcustid JOIN products ON products.productid = orderlines.lnkproductid
WHERE orders.orderid=2;
-Josh Berkus
______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete
informationtechnology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small
businesses fax 621-2533 and non-profit organizations. San Francisco