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
 Transact-SQL (2000)
 connect to multiple databases

Author  Topic 

tpiazza55
Posting Yak Master

162 Posts

Posted - 2008-01-15 : 15:20:24
How do i connect to a table on a database that is on a different server

the server name also has "-" in it

trying

select *
from [server-1-db].databasename..table

get an error about the "-"

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-01-16 : 01:37:59
quote:
Originally posted by tpiazza55

How do i connect to a table on a database that is on a different server

the server name also has "-" in it

trying

select *
from [server-1-db].databasename..table

get an error about the "-"




Have you added the server as a linked server?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-01-16 : 03:12:25
Duplicate of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=95583

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -