Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-11-17
1
Medium Priority
?
441 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 2000 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

715 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