How to write
Database
4
Posts
4
Posters
0
Views
1
Watching
-
select t1.*,t2.* from database1name.dbo.tablename as t1 join database2name.dbo.tablename as t2 on t1.columnname=t2.columnname where condition (if any)
-
The responses you have assume that the databases are on the same server, in which case database.owner.tablename will work. If they are on different servers you have a problem, you need to set up linked servers, something I hate doing as the server is then hard coded into the query.
Never underestimate the power of human stupidity RAH