I am trying to have my query update a field called LastUpdated and B1BirthYear on SQL Server by replicating the data on the local table. However, LastUpdated is being updated for every record while B1BirthYear just for the required record based on the primary key (Loan Identifier). Does anyone know why this is happening? Here is my query:
UPDATE [dbo_Tape Memo] INNER JOIN dbo_Tape_Memo_Local_tbl ON [dbo_Tape
Memo].[Loan Identifier] = dbo_Tape_Memo_Local_tbl.[Loan Identifier]
SET
[dbo_Tape Memo].B1YearBirth = [dbo_Tape_Memo_Local_tbl].[B1YearBirth],
[dbo_Tape Memo].LastUpdated = [dbo_Tape_Memo_Local_tbl].[LastUpdated]
WHERE (((dbo_Tape_Memo_Local_tbl.LastUpdated)>[dbo_Tape Memo].
[LastUpdated]));
Trying to run a simple query in SQL Server and the LastUpdated field is updated for every record when the below query is run:
UPDATE dbo.[Tape Memo]
SET dbo.[Tape Memo].LastUpdated = '2009-12-10 15:00:15.000'
WHERE dbo.[Tape Memo].[Loan Identifier]='9001383698'