On 19/10/11 22:08, Rich wrote:
> I have a mumps database with an ODBC connection so I can write queries
> from other databases. How can I write a sql in Postgresql to access
> this table to use in my Postgresql reports?
Use dbi-link to make an ODBC connection to the other database. Either
copy the data into a PostgreSQL table for processing, or make a view
over the dbi-link function call to query the data each time. The latter
option is slow, but requires no periodic refreshing of the copied table.
If you're on PostgreSQL 9.1 I'd recommend copying the data from the
other database via dbi-link into an unlogged table.
See: http://pgfoundry.org/projects/dbi-link and the documentation for
the dbi-link contrib module in your version of PostgreSQL.
Hopefully in 9.2 the odbc foreign data wrapper will be working and ready
for general use, in which case you'll be able to do it even more easily
using ODBC FDW (SQL/MED).
In response to
pgsql-sql by date
|Next:||From: Harald Fuchs||Date: 2011-10-25 12:42:34|
|Subject: Re: CTE or Subselect and outer joins not behaving as expected?|
|Previous:||From: Brice André||Date: 2011-10-25 06:02:19|
|Subject: Re: Handling mutliple clients access with views|