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
 SQL Server Development (2000)
 Joins between databases

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-12-06 : 10:01:31
Sarena writes "This seems to work:

join test.dbo.product Product on product.productkey = ms_manager.productkey

vs.
This NOT working:

join test.dbo.product on product.productkey = ms_manager.productkey

----Can you explain why or The correct way to write joins between different databases?"

Nazim
A custom title

1408 Posts

Posted - 2001-12-06 : 10:07:25
if u r not giving a alias u have to specify the tablename preceded with ownersname and databasename everywhere u r accessing the table and its columns

eg:
join test.dbo.product on product.productkey = ms_manager.productkey

correct way would be

join test.dbo.product on test.dbo.product.productkey = ms_manager.productkey


HTH


-------------------------
Nazim -- "Success is when Preparedness meets Opportunity"
Go to Top of Page
   

- Advertisement -