Try OpenEdge Now
skip to main content
SQL Development
Performing Multi-database Queries : An example of a multi-database query : Performing a multi-database query
 

Performing a multi-database query

The client is connected to the accounting databases. The catalog name for the first database is gledger and the catalog name for the second database is actpay. The client would like to execute a query statement against the accounts table of the pub schema in the gledger catalog and the accounts table of the pub schema in the actpay catalog. The client executes the following statement:
SELECT actpay.pub.accounts.name FROM gldger.accounts, actpay.accounts
WHERE actpay.pub.accounts.closed = ‘n' AND gledger.pub.accounts.closed = ‘n';