From: Tony Cowderoy <tony@nthfen.demon.co.uk>
To: daveh@insightdist.com
To: fozztexx@talia.hq.vxn.com
To: pgsql-hackers@postgresql.org
To: pgsql-interfaces@postgresql.org
Subject: Re: [INTERFACES] Group/Order by not in target - Was [NEW ODBC DRIVER]
Date: Tue, 12 May 1998 09:01:57 +0100
Message-ID: <E0yZ9ya-0004vH-00@nthfen.demon.co.uk> (raw)
I have hit the Access 97 problem of ORDER BY not in target list with a
simple, one-table query. The problem does not seem to have anything to do
with joins.
I have logged the SQL sent to the back end with the CommLog option in the
238 driver (very useful, thanks Byron). When using ORDER BY, Access 97
first sends a query to retrieve just the key(s) and then sends another to
get the required data. Hence, for the first query unless the fields used
in ORDER BY are key fields they are not in the target list. Nice one MS!
Nothing like making your software do the obvious thing, is there?
There is a work around. First create your query the usual way (point and
click if you like). Next, display the SQL. Finally, convert it into a
PASSTHROUGH query, so that the backend receives your SQL as written. This
worked for my very simple test, but I have not checked it out for more
complex queries.
BTW, Access 2.0 does not seem to have this problem, so why this strange
behaviour has been introduced into 97 I cannot imagine.
Tony Cowderoy
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-interfaces@postgresql.org
Cc: tony@nthfen.demon.co.uk, daveh@insightdist.com, fozztexx@talia.hq.vxn.com, pgsql-hackers@postgresql.org
Subject: Re: [INTERFACES] Group/Order by not in target - Was [NEW ODBC DRIVER]
In-Reply-To: <E0yZ9ya-0004vH-00@nthfen.demon.co.uk>
References: <E0yZ9ya-0004vH-00@nthfen.demon.co.uk>
* 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