ACCESS 2010 Update always updates the Update_Date

I'm running an Update query in Access 2010. EVen if there are no changes to data it will update the UPDATE_DATE with the current date and time. Is there some checksum I can use so this will only truly happen if data changes?

Code is

UPDATE tbl_Clients AS C INNER JOIN Audit_MasterClient AS A ON C.VisionClientID = A.[Vision Client Id]
C.VisionClientID = A.[Vision Client Id], ClientName = A.[Client Name],
C.ParentCompany = IIf (A.[Parent Company] IS NULL,A.[Client Name],A.[Parent Company]),
C.BusinessSubLine = A.[Business Sub Line], C.SensitivityRating = A.[Sensitivity Rating], C.SensitivityratingReason = A.[Sensitivity Rating Reason],
C.RelationshipManager = A.[Relationship Manager], C.ClientAdvocate = A.[Client Advocate], C.ClientServicesDH = A.[Client Services DH],
C.CAM = A.CAM, C.RSDeptHead = A.[RS Dept Head], C.CRA = A.CRA, C.ERISAConsultant = A.[ERISA Consultant], C.TotalAssets = A.[Total Assets],
C.SiebelID = A.[Siebel ID], C.UserID = UCASE([txtUserID]), C.UpdateTS = NOW();
Chuck LoweAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The last line of your query is

C.UpdateTS = NOW()

If you don't want it to update, then leave that out.

One (very lengthy) way to do that is something like the following

UpdateTS = NOW()
(A IS NULL OR A<>NewValueForA) OR
(B IS NULL OR B<>NewValueForB) OR
(C IS NULL OR C<>NewValueForC)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jim HornMicrosoft SQL Server Data DudeCommented:
>Is there some checksum I can use so this will only truly happen if data changes?
I don't see a WHERE clause in your query, so as written it will UPDATE all rows.
If you wish to limit this to only rows where the data changed, you'll have to add something like...

   c.VisionClientID <> a.[Vision Client Id] OR 
   c.ClientName <> a.[Client Name] OR 
   c.YouGetTheIdea <> a.[You Get the idea]

Open in new window

Chuck LoweAuthor Commented:
Thanks guys. I'm from a mainframe background and we never need to check for this. It's an automatic checksum against the records.
Thanks again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.