From: Molnar Laszlo <molnar.laszlo@richter.hu>
To: pgsql-sql@postgresql.org
Subject: LEFT JOIN and ODBC
Date: Mon, 26 Jul 1999 08:28:48 +0200
Message-ID: <199907260628.CAA66561@hub.org> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: molnar.laszlo@richter.hu
Subject: Re: LEFT JOIN and ODBC
In-Reply-To: <199907260628.CAA66561@hub.org>
References: <199907260628.CAA66561@hub.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox