The multi-part identifier "myServer.crm.dbo.data.id" could not be bound.

I get the following error when running a query between 2 linked servers.

The multi-part identifier "Server2.crm.dbo.data.id" could not be bound.



update data set valid = [Server2].[crm].[dbo].[data].[valid]
from  [Server2].[crm].[dbo].[data]
where data.ID =[Server2].[crm].[dbo].[data].[id]

Any ideas ?

thanks
LVL 1
JElsterAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
this should work better:
update data 
  set valid = r.[valid]
from  data 
join[Server2].[crm].[dbo].[data] r
 on  data.ID = r.[id]

Open in new window

0
 
JElsterAuthor Commented:
Thanks.. but why doesn't my original work?
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
because it does not conform to the syntax requirements... that's all...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.