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.
| Author |
Topic |
|
sqllearner
Aged Yak Warrior
639 Posts |
Posted - 2004-06-03 : 23:49:22
|
| I need to query different tables in different databases and they lie on the same server. |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2004-06-03 : 23:52:15
|
| you can reference the tables as follows:databasename.owner.tablename.see example below.......select a.id, a.desc, b.salesvaluefrom db1.dbo.item ajoin db2.dbo.sales bon a.id = b.idDuane. |
 |
|
|
|
|
|