Excel query of Postgress database - schema case problem..

F

Frank Brown

Let me begin by saying that I am by no means an Excel expert, so please bear
with me.

Our users need to use excel to analyze data from a Postgresql database. I
have the PSQLODBC properly configured, and it works just fine using Access.
The PG tables we setup with UPPER case table and column names as per
application requirements.
Using Excel's Pivot Table functionality means defining the query in MS
Query. Selecting the ODBC Datasource in MS Query works ok, and properly
displays all the tables and columns. The necessary columns can then be
selected without problems. Viewing the generated SQL, the Select statement
also appears correct, however the problem is that the IDENTIFIERS are not
Quoted. (SELECT ECG_BOARDS.BASE_PRODUCT
FROM SCOTT.ECG_BOARDS ECG_BOARDS) By design, the PSQLODBC driver changes
unquoted names to lower case so when this is executed the error (schema
"scott" does not exist) is returned. I have attempted various quoting
syntax ('SCOTT'...."SCOTT"....`SCOTT`....$$SCOTT$$....) all without success.
Just as a point of reference, if I recreate the database with all lower case
names the query process works fine. Can anyone offer any useful
suggestions ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top