How to fix "The multi-part identifier ... could not be bound" SQL Server 2008 error message?

Posted on 2009-05-02
Last Modified: 2012-05-06

I'm facing the error message "The multi-part identifier 'gerentes.nome' could not be bound" when I try to run the code below in the Microsoft SQL Server Studio Management. I have two tables and I want simply update data between them.

What might be the problem and how it might be fixed?

Thank you

Update clientes SET gerente_atual = gerentes.cod WHERE gerente_atual = gerentes.nome


Open in new window

Question by:marcoloppo
    LVL 41

    Expert Comment

    That usually happens when you have a typo in your field name or ALIAS. check and double check your script for correct spelling:
    Specially: 'gerentes.nome'  
    LVL 41

    Accepted Solution

    Also check the way you join the tables, it should be like this:

    Update clientes 
    SET clientes.gerente_atual = gerentes.cod 
    from clientes 
    inner join gerentes on clientes.gerente_atual = gerentes.nome

    Open in new window


    Author Closing Comment


    Thank you for your attention, your solution worked really fine.
    The problem was the missing "inner join" parameter.


    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now