Subject Re: Multidatabase SQL statements
Author Adam
Cross-database queries are not supported in Firebird.

However, a single transaction can span multiple firebird databases
which can do the 2 phase commit.

So you can run the following query against DB1

SELECT Table1.ID, Table1.Field1, Table1.Field2
FROM Table1

and using the same transaction against DB2

SELECT Table2.ID, Table2.Field1
FROM Table2

and join them in the client. But I think in your quest to simplify
what you want to do you end up with a query that wouldn't work anyway
because you are referencing tables from db2 not in your from clause

Anyhow. The short answer is no you can't, but the 2PC functions in
Firebird could allow you to do what you need to do.


--- In, "majstoru" <majstoru@y...> wrote:
> Hi,
> Does anybody try to make SQL statement on Firebird on the server
> level.
> Something like:
> SELECT DB1.Table1.Field1, DB1.Table1.Field2, DB2.Table2.Field1
> FROM DB1.Table1, DB2.Table1
> WHERE DB1.Table1.ID = DB2.Table2.Id
> Thanks