Sunday, January 20, 2013 4:02 PMHi all,
I have two databases. On seperate MS SQL Server.
So I linked database A to database B by performing sp_addlinkedserver['B'].
This works as i can list all the servers and its there using sp_linkedservers
I can the perform a command like
select * from B.master.sys.databases and it correctly shows all of the correct databases.
If I then go to do
select * from ['B'].database.dbo.table1
I get an error about an invalid object/object name. Whats wrong? I have tried adding square brackets around all parts and still the same?
Sunday, January 20, 2013 4:13 PM
Sunday, January 20, 2013 4:38 PM
You don't need to give single quote around the names
select * from [B].[database].[dbo].[table1]Regards