Solved

The multi-part identifier <Identifier> could not be bound

Posted on 2007-11-17
1
423 Views
Last Modified: 2008-02-01
Hello,

I'm trying to update one table column with the values in another table's column of the same name.  I'm getting the error:

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

This is the query:

UPDATE Gifts
SET Gifts.Received=(SELECT RECIPIENTS_GIVERS_TO_GIFTS.RECEIVED
                              FROM RECIPIENTS_GIVERS_TO_GIFTS
                              WHERE Gifts.Gift_ID=RECIPIENTS_GIVERS_TO_GIFTS.Gift_ID)

The "Gift_ID" is causing a problem in both tables, depending how I word the query.  This must have something to do with the ID key and foreign key relationship.  At this point, I'm only executing the sub-query, so the outlying query is not in play.

The GIFT_ID field in both tables is a smallint.

Any ideas?
0
Comment
Question by:NigelRocks
1 Comment
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 20306491

UPDATE G
SET Received=rg.RECEIVED
FROM Gifts g
INNER JOIN  RECIPIENTS_GIVERS_TO_GIFTS rg
ON G.Gift_ID=RG.Gift_ID
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

910 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

16 Experts available now in Live!

Get 1:1 Help Now