The multi-part identifier "...." could not be bound.

  • I'm getting the error shown below when I run the following query. What does it mean and how can I correct it?

    TIA,

    barkingdog

    update CFD

    set

    CName = WMT.CName

    from

    (

    select CF1 from CFD

    intersect

    select CF1 from WorkMTable

    ) as MatchTbl join WorkMTable as WMT

    on (CFD.CF1 = MatchTbl.CF1)

    where

    (

    (WMT.CName <> CFD.CName ) and

    (CFD.MName =1)

    )

    Msg 4104, Level 16, State 1, Line 12

    The multi-part identifier "CFD.CF1" could not be bound.

  • Because you are not referencing the table CFD in the from clause. You need something like:

    UPDATE a

    SET {columns}

    FROM CFD AS a

    JOIN (intersect query) ON ...

    JOIN {other tables} ON ...

    WHERE ...

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply