Update from another table and multiple criteria

35 pts.
Tags:
SQL Server
SQL Server tables
update PHYS_COUNT_TAG set COUNT_QTY= (SELECT qty from MC_PART_LOCATION where MC_PART_LOCATION.part_id = PHYS_COUNT_TAG.PART_ID and MC_PART_LOCATION.location_id = PHYS_COUNT_TAG.LOCATION_ID) The above does not work with the error Msg 4104, Level 16, State 1, Line 4 The multi-part identifier "PCT.PART_ID" could not be bound. Msg 4104, Level 16, State 1, Line 5 The multi-part identifier "PCT.LOCATION_ID" could not be bound. Please help. It's urgent.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    As far as I can tell, the error messages do not refer to that SQL UPDATE statement. More of the code is needed. The SQL that you showed does not have any clear relationship to "PCT". There is nothing that we can tell from the small pieces you have shown. . How are you running the statement? . Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following