ODBC Driver - Mailing list pgsql-general

From Bruce Tong
Subject ODBC Driver
Date
Msg-id Pine.LNX.3.95.980722125602.15485D-100000@laxmi.ev.net
Whole thread Raw
Responses Re: [GENERAL] ODBC Driver  (Maarten Boekhold <maartenb@dutepp0.et.tudelft.nl>)
List pgsql-general
I knew I needed to check my work before bringing the ODBC driver problems
out in the open. Here's what I've found.

I was designing a simple query using MS-Access having already defined
an external data source to a PostgreSQL database just to make sure
things work as I expected. The database is bigger than this, but here's
the relevant parts of the tables...

Table: School
  school_id      integer unique not null,
  school_name    varchar( 50 )

Table: Contact
  contact_id     integer unique not null,
  contact_lname  varchar( 50 ),
  contact_fname  varchar( 50 ),
  contact_school integer not null

I wanted to see contact_lname, contact_fname, and school_name. Using MS
Access's query view I dragged a link from contact_school to school_id,
then I dragged the three fields I wanted to my query. (Maybe you can see
where this is going.) I attempted to view the results.

A window appeared and said "ODBC-call failed".

Another window appeared and said "Error while executing the query. ERROR:
The field being ordered by must appear in the target list (#1)."

Since I hadn't specified any sorting, the "order by" part of the message
had me confused. I decided to have MS Access show me the SQL it had
generated:

SELECT contact.contact_lname, contact.contact_fname, school.school_name
FROM contact INNER JOIN school ON contact.contact_school =
school.school_id;

If I remember correctly, INNER JOIN is not yet supported in PostgreSQL,
which would explain the failure. Sorry to have accused the failure on the
ODBC driver. While some people's ignorance is bliss, mine thrashes. At
least now I know what a $#@!% INNER JOIN is. ;)


Bruce Tong                 |  Got me an office; I'm there late at night.
Systems Programmer         |  Just send me e-mail, maybe I'll write.
Electronic Vision / FITNE  |
zztong@laxmi.ev.net        |  -- Joe Walsh for the 21st Century


pgsql-general by date:

Previous
From: Bruce Tong
Date:
Subject: Re: [GENERAL] Re: [HACKERS] [Fwd: SGVLLUG Oracle and Informix on Linux]
Next
From: "Brett W. McCoy"
Date:
Subject: Re: [GENERAL] Postgres vs commercial products