From: | "Molnar Laszlo" <molnar(dot)laszlo(at)richter(dot)hu> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | LEFT JOIN and ODBC |
Date: | 1999-07-26 06:28:48 |
Message-ID: | 199907260628.CAA66561@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Oleg Bartunov | 1999-07-26 06:28:57 | Re: [HACKERS] Re: [SQL] inserts/updates problem understressing ! |
Previous Message | Vadim Mikheev | 1999-07-26 06:26:06 | Re: [SQL] inserts/updates problem under stressing ! |