The multi-part identifier could not be bound

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • s1shoaib
    New Member
    • Mar 2020
    • 4

    The multi-part identifier could not be bound

    Code:
    [B]FROMTrying to update data from one server to the server. There are 3 columns: Year, Site and Code that need to be updated from my current server to Server2, however I keep on getting the error of "The multi-part identifier could not be bound." Below is my query:
    
    
    
    [CODE]UPDATE [Server2].[Fleet].[dbo].[log]
    
    SET 
    [Server2].[Fleet].[dbo].[log].[Year]= Poll.[Year],
    [Server2].[Fleet].[dbo].[log].[Site]= Poll.[Site],
    [Server2].[Fleet].[dbo].[log].[Code]= Poll.([B]SELECT Year, 
    Site, 
    Code
    
    [B]FROM sacfindb.[UC_POLog].[dbo].[ctbl.Main.Report]
    
    [B]WHERE Year = left(convert(varchar,getdate(),126),7)
          AND Site = '7115'
          and Code in (
          '52120','52140','52147','52146','52182'
          )) Poll
    [/B][/B][/B][/B]
Working...