Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8294899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:23:36+00:00 2026-06-08T14:23:36+00:00

I am trying to update a table so that all values become identical to

  • 0

I am trying to update a table so that all values become identical to another table on a different database. I can do it with an insert command but not an update command.

This works:

INSERT [test1].[dbo].[table1]
    SELECT * FROM [source].[dbo].[table1]

This does not:

UPDATE [test2].[dbo].[table1] 
SET [source].[dbo].[table1] = [test2].[dbo].[table1]

nor this:

UPDATE [test2].[dbo].[table1]
SET 
     [test2].[dbo].[table1].[PKcolumn] = [source].[dbo].[table1].[PKcolumn]
    ,[test2].[dbo].[table1].[column2] = [source].[dbo].[table1].[column2] 
    ,[test2].[dbo].[table1].[column3] = [source].[dbo].[table1].[column3] 

WHERE
    [source].[dbo].[table1].[PKcolumn] = [test2].[dbo].[table1].[PKcolumn]

The result is always some variation of this error message despite checking for errors countless times:

Msg 4104, Level 16, State 1, Line 1

The multi-part identifier “source.dbo.table1.PKColumn” could not be bound.

Any Suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:23:38+00:00Added an answer on June 8, 2026 at 2:23 pm

    Since update can only affect one table, you don’t have to specify it:

    UPDATE dest
    SET    column2 = src.column2
    FROM   source.dbo.table1 as src
    JOIN   test2.dbo.table1 as dest
    on     dest.PKcolumn = src.PKcolumn
    

    P.S. Depending on which database you’re using, you might want to check out the MERGE statement.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to update one table based on values in another table. What's wrong
Trying to simple update a row in an SQLiteDatabase Database. I can insert records
I'm trying to update all records in one table with the values found in
I am trying to update rows in a data table that intersect rows in
I have a heap based table in MySQL that I am trying to update
I'm trying to update the data in the parent table that is referenced in
I am trying to replace all values that I have in a field called
Hit a speed bump, trying to update some column values in my table from
I am trying to query an SQL table, and then have all the values
I have an HTML Table that looks like this: The user can update any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.