Select from two tables from different databases

Hi, I’m trying to join two tables from different databases. The query I’m using is:

SELECT a.id, b.name FROM db1.table1 a INNER JOIN db2.table2 b ON a.id = b.idUser

where “db1” and “db2” are the name of the connections to each database. When I run the query using the Database Query Browser the following error appears:

[quote]GatewayException: ERROR: no existe el esquema «db1»
caused by PSQLException: ERROR: no existe el esquema «db1»[/quote]

Any clues?,

Thanks

Try making db1 and db2 the name of the database itself, rather than the name of the connection.

This will only work if they are two databases within the same database server. If they are different table’s from different database servers, you can’t do a join like this with a SQL query, unless your database server supports some sort of remote join.

In my case there are different database servers. I’ll have to find another way to get what I want.

Thanks for the help.
Regards