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)
 Referencing common tables

Author  Topic 

El Kabong
Starting Member

3 Posts

Posted - 2002-08-18 : 12:45:52
My company has multiple SS2K databases for its client data, and the data must remain segregated. There is some common read-only data among the databases, though, such as calendar information.

I want to set up a database whose only purpose is to store that common information so that the other DB's can access it in views, packages, and procedures.

My question: Is it possible to reference those common tables within a view or within my stored procedure code, and, if so, how is it done?

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-08-18 : 13:33:47
Yes, use the 3-part naming convention to specify the database, owner, and table/object name being referenced:

SELECT * FROM otherServer.dbo.tableName

See Books Online for more information on object names.

Go to Top of Page
   

- Advertisement -