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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-04-16 : 10:09:10
|
| Jacqui writes "Is it possible to do an inner join across 2 databases that are sitting on the same SQL server (SQL 7.0). The one table(A) holds a foreign key to a table in another database (B). I can not change the DB design.What is the syntax?? ... I have tried using dbname.tablename with no luck.Thanks." |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2002-04-16 : 10:14:31
|
| a little forum search could have saved you.Anywayz , follow the four part naming convention.Servername.databasename.owner.objectnameselect t1.columnames from onedatabase..tablename t1on anotherdatabase..tablename t2on t1.commonkey=t2.commonkeyHTH-------------------------------------------------------------- |
 |
|
|
VyasKN
SQL Server MVP & SQLTeam MVY
313 Posts |
Posted - 2002-04-16 : 10:16:02
|
| Please read this FAQ entry at my site: http://vyaskn.tripod.com/programming_faq.htm#q13You basically have to prefix the table name with database.owner--HTH,VyasCheck out my SQL Server site @http://vyaskn.tripod.com |
 |
|
|
|
|
|