I have two tables in different databases on the same database server.
Both databases have the same structure, but different data. Database1 (Test1) is the last, and database2 (Test2) is an old copy of the database.
- Test1 has a table called
Employee with 3000 records - Test2 has a table called
Employee with 1000 records
I need to update a table in Test1 from the same table in Test2 for a specific column called DeptID because the values ββin the Employee table in Test2 database (old) have been updated. Therefore, I need to update the table in the new database from the table in the old database, which has about 1000 rows.
In other words, I need to update the DeptID column in the Employee table in Test1 database with any values ββthat I have in the DeptID column in the Employee table in Test2 DB.
I know that I can restore the database itself, but this is not a solution. I need to update the values ββin the Test1 database from the Test2 database.
sql-server-2005
happysmile Feb 07 '11 at 10:50 2011-02-07 10:50
source share