Domanda

I am trying to write a query that uses a local database and a linked server and am getting a 4101 multi-part identifier error when I alias the linked server.

If I run

select *
from [ServerName\Instance].[DatabaseName].[dbo].[tbl_CUA_Visitation_Report_Line]

I get all of the table's records back. But if I run

select l.*
from [ServerName\Instance].[DatabaseName].[dbo].[tbl_CUA_Visitation_Report_Line] AS l

If get the message:

Msg 4104, Level 16, State 1, Line 1 The multi-part identifier "tbl_CUA_Visitation_Report_Line.acct_trip_end_date" could not be bound.

I'll get the same when joining a local and linked tables using alias. This field is present in the table.

I cannot figure out what the problem is or where the issue might be. Any help would be great.

Both databases are 2008 R2 (one is on SP2 the other SP1).

È stato utile?

Soluzione

Microsoft confirmed this is a known bug. You have to install a cumulative update according to this link: http://support.microsoft.com/kb/2352413/en-us?sd=rss&spid=13165

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top