example, assuming i have some table in SQL Server 2000 and i also have in MySQL. the table in SQL Server 2000 is for example Table1 and in MySQL is Table2.
if i create a query that will combine and retrieve the fields of the two database, is it possible?
if so anyone who have idea with that and how to do that?
Thank You.
Quote:
Originally Posted by klaydze
hi guys, is it possible that i can retrieve records from different database like SQL Server 2000 and MySQL?
example, assuming i have some table in SQL Server 2000 and i also have in MySQL. the table in SQL Server 2000 is for example Table1 and in MySQL is Table2.
if i create a query that will combine and retrieve the fields of the two database, is it possible?
if so anyone who have idea with that and how to do that?
Thank You.
I assume you mean retrieving records from different servers because from different databases on the same Server it is just as simple as mentioning database name and owner in front of your table name like this:
Databasename.dbo.tablename
First ask your DBA to link both servers. With linked server it is really easy to do. If you dont have DBA go to help then search for subject linked servers. When servers are linked you query tables like this
Servername.Databasename.dbo.tablename
Also you can try OPENDATASOURCE query. Search for it in SQL help. You still need correct drivers to be installed on SQL server side and use them as provider otherwise it will not work.
Good Luck.
No comments:
Post a Comment