Re: [INTERFACES] Group/Order by not in target - Was [NEW ODBC DRIVER]

From: Tony Cowderoy <tony(at)nthfen(dot)demon(dot)co(dot)uk>
To: daveh(at)insightdist(dot)com, fozztexx(at)talia(dot)hq(dot)vxn(dot)com, pgsql-hackers(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] Group/Order by not in target - Was [NEW ODBC DRIVER]
Date: 1998-05-12 08:01:57
Message-ID: E0yZ9ya-0004vH-00@nthfen.demon.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Zeugswetter 1998-05-12 08:46:05 AW: [HACKERS] Re: [QUESTIONS] money or dollar type
Previous Message Andreas Zeugswetter 1998-05-12 07:51:12 AW: [HACKERS] questionable codes in libpq/backend communication

Browse pgsql-interfaces by date

  From Date Subject
Next Message Olaf Mittelstaedt 1998-05-12 08:50:22 Re: NEW ODBC DRIVER
Previous Message Craig Sanders 1998-05-12 07:23:50 "No Postgres username" error with psqlodbc