From: | Bruce Tong <zztong(at)laxmi(dot)ev(dot)net> |
---|---|
To: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | ODBC Driver |
Date: | 1998-07-22 17:11:29 |
Message-ID: | Pine.LNX.3.95.980722125602.15485D-100000@laxmi.ev.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-interfaces |
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 $#(at)!% 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(at)laxmi(dot)ev(dot)net | -- Joe Walsh for the 21st Century
From | Date | Subject | |
---|---|---|---|
Next Message | Jeffrey Napolitano | 1998-07-22 17:30:27 | Moving Databases |
Previous Message | Brett W. McCoy | 1998-07-22 16:24:47 | Re: [GENERAL] Postgres vs commercial products |
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Pratt | 1998-07-22 21:09:29 | ODBC Error |
Previous Message | Chris Williams | 1998-07-22 16:43:57 | Re: [INTERFACES] Win32 version of the psql library |