Access '97 {oj ...} Left Join

From: "Henshall, Stuart - WCP" <SHenshall(at)westcountrypublications(dot)co(dot)uk>
To: "'pgsql-odbc(at)postgresql(dot)org'" <pgsql-odbc(at)postgresql(dot)org>
Subject: Access '97 {oj ...} Left Join
Date: 2001-04-10 14:57:47
Message-ID: E2870D8CE1CCD311BAF50008C71EDE8E01CA7D35@MAIL_EXCHANGE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Has any one else had problems Access '97 changing the left join syntax,eg:
SELECT jobs_pg.id, edition_pg.edid
FROM jobs_pg LEFT JOIN edition_pg ON jobs_pg.id = edition_pg.id;
to:
SELECT "jobs","id","edition","edid" FROM {oj "jobs LEFT OUTER JOIN "edition"
ON ("jobs"."id"="edition"."id") }
Where id and edid are the primary keys.
Is there an easy way around this that I've missed?
Having a quick look at the ODBC 3.0 SDK it seems this is an ODBC thing. It
appears that ODBC use an escape sequence for outer joins. Here's the BNF
(according to the ODBC SDK 3.0):
ODBC-outer-join-escape ::=
ODBC-esc-initiator oj outer-join ODBC-esc-terminator
outer-join ::= table-name [correlation-name] {LEFT | RIGHT | FULL}
OUTER JOIN{table-name [correlation-name] | outer-join} ON search-
condition
correlation-name ::= user-defined-name
ODBC-esc-initiator ::= {
ODBC-esc-terminator ::= }

It also mentions that it looks to SQLGetInfo with SQL_OJ_CAPABILITIES. But I
couldn't find any thing usefull (bar totally turning them off :( )
Theres a couple of alternatives that I can see, views or ODBC Pass Through.
If any one has a better solution (I am being blind and missing an option or
whatever) please share.
(Incase you're wondering why I'm not using Pass through queries and views
from the start, its because I've just converted an Access '97 file based db,
and I'm guessing if I've come up against this problem, others might).
- Stuart

Browse pgsql-odbc by date

  From Date Subject
Next Message Dave Page 2001-04-10 15:21:56 RE: 64 bit integers
Previous Message Christian Bucanac 2001-04-10 13:57:21 64 bit integers