By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,316 Members | 2,132 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,316 IT Pros & Developers. It's quick & easy.

Table joins across databases

P: 1

Can someone tell me how one would join tables across different databases, the databases being in the same instance.

select <field> from database1.table1 a, database2.table1 b
where a.key=b.key

does not seem to work

Apr 3 '08 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 127
This is not possible without federated environment.

You can try some alternatives like: Export from one table(first database in PC/IXF format), create GTT in second database, import in this GTT and perform select.

You might want to have a look at the sample SQLLIB/samples/c/dbmcon.sqc. This samples demonstrates how to use two databases simultaneously.

Let me know if your problem is solved.

-- Sanjay
Apr 3 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.