Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 mutliple DB query

Author  Topic 

ronin2307
Posting Yak Master

126 Posts

Posted - 2006-11-27 : 17:54:04
is it possible to query two DBs in a single query?
if so, how?

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-11-27 : 17:55:59
Use three part names like this

SELECT ....
FROM databasename1.ownername1.tablename1
INNER JOIN databasename2.ownername2.tablename2 ON ...
Go to Top of Page

ronin2307
Posting Yak Master

126 Posts

Posted - 2006-11-27 : 17:57:08
great thanx
Go to Top of Page
   

- Advertisement -