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)
 Stored Procedures

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-03-07 : 07:40:41
Nancy writes "This is probably not a tough one for you, but I mostly work on Informix or Oracle databases.

Can I run a stored procedure on database A and have it access tables on database B? If so, what is the prefix? I would have thought the database name@server name:table name, but that doesn't seem to work in Sql Server.

Thanks"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2005-03-07 : 07:41:43
In SQL Server, the name parts are separated by a period (.):

SELECT * FROM myDatabase.myUser.myTable
Go to Top of Page
   

- Advertisement -