![]() |
Excel query of Postgress database - schema case problem..
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 ? |
All times are GMT +1. The time now is 06:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com