cheslijones
cheslijones

Reputation: 9194

MS Access SQL Query (not VBA) to 3rd Party Database

Looking to do this without using VBA and using MS Access SQL. You know, going to Query Design and then clicking the "SQL" button in the bottom right corner.

I have some users that know basic SQL SELECT queries, but don't know VBA, and want to write their own queries while we are building the front-end for the PostgreSQL database everything is being migrated to. What is the syntax to query an ODBC connection in MS Access SQL (again, not using VBA)?

In a nutshell, database migrated from Access to PostgreSQL, some users know SQL but not VBA, want to do queries that haven't been built into the new front-end yet, looking for the correct syntax in MS Access SQL FROM [ODBC:postgres].Users or something. Thanks for the help!

Upvotes: 0

Views: 80

Answers (1)

Parfait
Parfait

Reputation: 107687

Consider either of following. During creation of either, you will be prompted for ODBC DSN/Driver. Two prerequisites are required: MS Access GUI .exe and Postgres ODBC driver:

  1. LINKED TABLES: link Postgres tables in Access frontend and write queries with Access SQL dialect. Since linked tables are live, all data changes reflect in the Postgres database. Find this option under External Data tab and choose the globe icon.
  2. PASS-THRU QUERIES: create pass-thru queries and write in Postgres SQL dialect. Do note: only single statements are allowed, no multi-step or stored procedures allowed. Find this special query type under Create / Query Design conditional tab, also a globe icon.

Upvotes: 1

Related Questions