Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linked Server Select 1

Status
Not open for further replies.

DrSql

Programmer
Jul 16, 2000
615
US
I am creating a select statement from Server db to Server B db. The Server B instance is called ServerB\VS2
The links are fine.

select * from ServerB\VS2.dbo.tablename
error:Server: Msg 170, Level 15, State 1, Line 6
Line 6: Incorrect syntax near '\'.


Any suggestions?


Dr.Sql
Good Luck.
 
Brackets. You also need to use the full four part name, not a three part name.
Code:
select *
from [ServerB\VS2].DatabaseName.dbo.tablename


Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(Not quite so old any more.)
 
Thanks for the qucik response..

Dr.Sql
Good Luck.
 
no problem.

Denny
MCSA (2003) / MCDBA (SQL 2000)

--Anything is possible. All it takes is a little research. (Me)

[noevil]
(Not quite so old any more.)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top