Update query not updating

I'm trying to update a table using an update query.  The query seems to run fine, but none of the data is updated in the table.  I'm not sure if I'm missing something.  The query is below.
UPDATE tblFinSumNetInc INNER JOIN ABCTest2 ON (tblFinSumNetInc.DateOfData = ABCTest2.DateOfData) AND (tblFinSumNetInc.txtClientNumber = ABCTest2.CliNum) SET ABCTest2.CliNum = [tblFinSumNetInc].[txtClientNumber], ABCTest2.DateOfData = [tblFinSumNetInc].[DateOfData], ABCTest2.InterestExpense = [tblFinSumNetInc].[InterestExpense], ABCTest2.SalaryExpense = [tblFinSumNetInc].[SalaryExpense], ABCTest2.OperatingExpense = [tblFinSumNetInc].[OperatingExpense], ABCTest2.Taxes = [tblFinSumNetInc].[Taxes], ABCTest2.Distributions = [tblFinSumNetInc].[Distributions], ABCTest2.Notes = [tblFinSumNetInc].[NetIncomeNotes];

Open in new window

nfstrongAsked:
Who is Participating?
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.

Nathan RileyFounderCommented:

UPDATE tblFinSumNetInc 
SET ABCTest2.CliNum = [tblFinSumNetInc].[txtClientNumber], ABCTest2.DateOfData = [tblFinSumNetInc].[DateOfData], ABCTest2.InterestExpense = [tblFinSumNetInc].[InterestExpense], ABCTest2.SalaryExpense = [tblFinSumNetInc].[SalaryExpense], ABCTest2.OperatingExpense = [tblFinSumNetInc].[OperatingExpense], ABCTest2.Taxes = [tblFinSumNetInc].[Taxes], ABCTest2.Distributions = [tblFinSumNetInc].[Distributions], ABCTest2.Notes = [tblFinSumNetInc].[NetIncomeNotes];
 
INNER JOIN ABCTest2 ON (tblFinSumNetInc.DateOfData = ABCTest2.DateOfData) AND (tblFinSumNetInc.txtClientNumber = ABCTest2.CliNum) 

Open in new window

0
Nathan RileyFounderCommented:
actually use this
UPDATE tblFinSumNetInc 
SET ABCTest2.CliNum = [tblFinSumNetInc].[txtClientNumber], ABCTest2.DateOfData = [tblFinSumNetInc].[DateOfData], ABCTest2.InterestExpense = [tblFinSumNetInc].[InterestExpense], ABCTest2.SalaryExpense = [tblFinSumNetInc].[SalaryExpense], ABCTest2.OperatingExpense = [tblFinSumNetInc].[OperatingExpense], ABCTest2.Taxes = [tblFinSumNetInc].[Taxes], ABCTest2.Distributions = [tblFinSumNetInc].[Distributions], ABCTest2.Notes = [tblFinSumNetInc].[NetIncomeNotes];
 
FROM tblFinSumNetInc 
inner join ABCTest2 on (tblFinSumNetInc.DateOfData = ABCTest2.DateOfData) AND (tblFinSumNetInc.txtClientNumber = ABCTest2.CliNum) 

Open in new window

0
nfstrongAuthor Commented:
I get an error that there is syntax after the end of the statement.  I even tried the below code.  It runs the query but doesn't update the data.
UPDATE tblFinSumNetInc inner join ABCTest2 on (tblFinSumNetInc.DateOfData = ABCTest2.DateOfData) AND (tblFinSumNetInc.txtClientNumber = ABCTest2.CliNum)
SET ABCTest2.CliNum = [tblFinSumNetInc].[txtClientNumber], ABCTest2.DateOfData = [tblFinSumNetInc].[DateOfData], ABCTest2.InterestExpense = [tblFinSumNetInc].[InterestExpense], ABCTest2.SalaryExpense = [tblFinSumNetInc].[SalaryExpense], ABCTest2.OperatingExpense = [tblFinSumNetInc].[OperatingExpense], ABCTest2.Taxes = [tblFinSumNetInc].[Taxes], ABCTest2.Distributions = [tblFinSumNetInc].[Distributions], ABCTest2.Notes = [tblFinSumNetInc].[NetIncomeNotes];

Open in new window

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Nathan RileyFounderCommented:
Oh sorry just saw that you were on access so the syntax may be a little different but don't you need a set for each one?
UPDATE tblFinSumNetInc inner join ABCTest2 on (tblFinSumNetInc.DateOfData = ABCTest2.DateOfData) AND (tblFinSumNetInc.txtClientNumber = ABCTest2.CliNum)
 
SET ABCTest2.CliNum = [tblFinSumNetInc].[txtClientNumber]
SET ABCTest2.DateOfData = [tblFinSumNetInc].[DateOfData]
SET ABCTest2.InterestExpense = [tblFinSumNetInc].[InterestExpense]
SET ABCTest2.SalaryExpense = [tblFinSumNetInc].[SalaryExpense]
SET ABCTest2.OperatingExpense = [tblFinSumNetInc].[OperatingExpense]
SET ABCTest2.Taxes = [tblFinSumNetInc].[Taxes]
SET ABCTest2.Distributions = [tblFinSumNetInc].[Distributions]
SET ABCTest2.Notes = [tblFinSumNetInc].[NetIncomeNotes];

Open in new window

0
Nathan RileyFounderCommented:
Nevermind you were right with your first query.  It's not the query its your data
0
Nathan RileyFounderCommented:
Why are you update the rows that already match from your join?
UPDATE tblFinSumNetInc inner join ABCTest2 on (tblFinSumNetInc.DateOfData = ABCTest2.DateOfData) AND (tblFinSumNetInc.txtClientNumber = ABCTest2.CliNum)
SET 
ABCTest2.InterestExpense = [tblFinSumNetInc].[InterestExpense], ABCTest2.SalaryExpense = [tblFinSumNetInc].[SalaryExpense], ABCTest2.OperatingExpense = [tblFinSumNetInc].[OperatingExpense], ABCTest2.Taxes = [tblFinSumNetInc].[Taxes], ABCTest2.Distributions = [tblFinSumNetInc].[Distributions], ABCTest2.Notes = [tblFinSumNetInc].[NetIncomeNotes];

Open in new window

0
nfstrongAuthor Commented:
Ok, I removed the CliNum and DateOfData from the update.  I reran the query and it runs fine, but it still doesn't update the data.
0
Nathan RileyFounderCommented:
What are the columns in abctest right now?  Are they NULL?
0
nfstrongAuthor Commented:
That was the problem.  I had the SET statements backwards.  I was trying to update ABCTest2 to tblFinSumNetInc, but it was doing the opposite.  I changed the SET statements and now it works fine.  Thanks.
0

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
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.