How do I query tables from 2 databases? [message #370802] |
Wed, 09 February 2000 16:50 |
kat
Messages: 15 Registered: February 2000
|
Junior Member |
|
|
Hi,
it must be a simple question for everyone else but I am trying to figure out how to query tables from 2 different databases with 2 different sets of connection strings. Thanks in advance.
|
|
|
|
Re: How do I query tables from 2 databases? [message #370813 is a reply to message #370802] |
Thu, 10 February 2000 13:55 |
Edward Jayaraj
Messages: 7 Registered: December 1999
|
Junior Member |
|
|
Create a database link between the two database.
and use the link in the query.
Create database link link_name connect to user_name identified by Pwd using 'host_string'
then use the link name as follow:
select *
from table_name@lnk_name ;
This should work for you.......
Let me know if u have any issue with it.
Thanks
|
|
|
Re: How do I query tables from 2 databases? [message #370816 is a reply to message #370813] |
Thu, 10 February 2000 18:57 |
Nell
Messages: 7 Registered: February 2000
|
Junior Member |
|
|
Hi, thanks so much for your reply. The fact is I am using the database link:
select * from table@linkName;
I just didnt know I have to create the link. I am very new to Oracle. I was told to connect by writing my select statement using table@Link(only now I know that is called a link) and thought that's all I need to access remote data. Now I know you have to create the link too. Oh, well, it's always nice to learn new stuff. Thanks again, I really appreciate it.
|
|
|