tags:

views:

43

answers:

2

I have added an linked server from an SQL 2000 server to an SQL 2005 server which is a named instance. This has worked well until I have got to a table with a space in the name.

It seems to not be able to resolve the object, and causes an error on the query. Is this a known issue with linked servers, I can't find anything mentioning it and do not really want to have to rename a table, finding all references to it.

EDIT: I did use square brackets around the table name

+1  A: 

Use square brackets around the table name.

SELECT * FROM [SERVER].[Database].[dbo].[Table Name]
Randolph Potter
Sorry yeah did that doesn't seem to work
PeteT
A: 

For whatever reson table names with spaces in don't work no matter what square brackets you use. This may be a limitation related to the fact the server I am linking from is sql 2000. I solved this using a view with the same name without the space.

PeteT