rails/rails — Issue #3367: Join beetween 2 databases with pure SQL syntax
Author: tinozorotovic
Created: 2011-10-19 13:33:17+00:00
State: open

I think that there is no way to join 2 tables from 2 different databases in Rails 3 using SQL syntax like:

sql <<-SQL
SELECT
db1.table1.row,
db1.table1.row2
db2.table2.row
FROM
db1.table1
JOIN
db1.table1 ON db1.table1.id = db2.table2.id
SQL

PS. Using "standard" multiple connections in models normally works but pure SQL syntax don't.
Regards!