Received: from richter.hu ([194.143.226.4]) by hub.org (8.9.3/8.9.3) with SMTP id CAA66561 for ; Mon, 26 Jul 1999 02:28:45 -0400 (EDT) (envelope-from molnar.laszlo@richter.hu) Message-Id: <199907260628.CAA66561@hub.org> Received: from a1.5 by richter.hu;Mon, 26 Jul 1999 06:28:48 GMT From: "Molnar Laszlo" To: pgsql-sql@postgresql.org Date: Mon, 26 Jul 1999 08:28:48 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: LEFT JOIN and ODBC Priority: normal X-mailer: Pegasus Mail for Win32 (v3.01b) Hello all, I use PostgreSQL through ODBC with MSACCESS. In access I have the following query with several LEFT JOIN clauses. SELECT idvshelykod.sorszam, idvshelykod.helykod, idvshelykod.eloirat1, idvshelykod.eloirat2, a.a_hatas, b.b_hatas, c.c_hatas, d.mg_ic50, d.mhs_ic50, d.mg_tox, d.mhs_tox FROM (((idvshelykod LEFT JOIN c1qfizio ON idvshelykod.helykod = a.helykod) LEFT JOIN b ON idvshelykod.helykod = b.helykod) LEFT JOIN c ON idvshelykod.helykod = c.helykod) LEFT JOIN d ON idvshelykod.helykod = d.helykod; Now, I want to produce the same result from PostgreSQL with PH3, but I know that PGSQL does not support LEFT JOIN. I also know that the ODBC driver PostgreSQLize the access query so I have carefully read the sql audit file: conn=46022972, query='SELECT "helykod" ,"b"."oid" FROM "b" ORDER BY "helykod" ' [ fetched 10902 rows ] conn=46008444, query='SELECT "helykod" ,"idvshelykod"."oid" FROM "idvshelykod" ORDER BY "helykod" ' [ fetched 11068 rows ] conn=46022972, query='SELECT "helykod" ,"d"."oid" FROM "d" ORDER BY "helykod" ' [ fetched 1161 rows ] conn=46022972, query='SELECT "helykod" ,"a"."oid" FROM "a" ORDER BY "helykod" ' [ fetched 267 rows ] conn=46022972, query='SELECT "helykod" ,"c"."oid" FROM "c" ORDER BY "helykod" ' [ fetched 267 rows ] conn=46008444, query='SELECT "helykod" ,"b_hatas" FROM "b" ORDER BY "helykod" ' [ fetched 10902 rows ] conn=46022972, query='SELECT "sorszam" ,"eloirat1" ,"eloirat2" ,"helykod" FROM "idvshelykod" ORDER BY "helykod" ' [ fetched 11068 rows ] conn=46022972, query='SELECT "helykod" ,"c_hatas" FROM "c" ORDER BY "helykod" ' [ fetched 267 rows ] conn=46022972, query='SELECT "helykod" ,"a_hatas" FROM "a" ORDER BY "helykod" ' [ fetched 267 rows ] conn=46022972, query='SELECT "helykod" ,"mg_ic50" ,"mhs_ic50" ,"mg_tox" ,"mhs_tox" FROM "d" ORDER BY "helykod" ' [ fetched 1161 rows ] and from this series of query the ODBC produce the desirable output. What is the algorithm for postgresqlize the access query? How can I see the exact query sent to the postmaster daemon from ODBC? Or simply, how can I postgresqlize my query? Laszlo Molnar Gedeon Richter Ltd. Hungary