Update Qry


I need to update the tblLetterOfCredit.Amount to the value from Import_LC_Amount but only for tblLetterOfCredit.Currency = USD.

tblLetterOfCredit.Currency has a row source qry of:
SELECT tblCurrencyExchange.CurrencyID, tblCurrencyExchange.Currency FROM tblCurrencyExchange;

this is what I have now joined on [LCNo] to [JP Morgan Reference] and need the USD part:
UPDATE IMPORT_LC_AMOUNTS INNER JOIN tblLetterOfCredit ON IMPORT_LC_AMOUNTS.[JP Morgan Reference] = tblLetterOfCredit.LCNo SET tblLetterOfCredit.Amount = [Import_LC_Amount].[Issued amt];

anything else please let me know
Thank you
pdvsaProject financeAsked:
Who is Participating?
I thought you wanted to update tblLetterOfCredit?

Here is the syntax I think you are looking for

Update TableToBeUpdated
Set ColumnToBeUpdated = OtherTable.SourceColumn
From SourceTable
Where SourceTable.LinkingColumnorLogic = TableToBeUpdated.LinkingColumnorLogic
pdvsaProject financeAuthor Commented:
I guess I had it wrong.  I am updating tblLetterofCredit

Update tblLetterOfCredit
SET tblLetterOfCredit.Amount = [Import_LC_Amount].[Issued amt];
from tblLetterOfCredit
Where tblLetterOfCredit.Currency = [Import_LC_Amount].[Currrency]

See something wrong with that?
Should work
As always, backup your database before making any mass updates like that.
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.

All Courses

From novice to tech pro — start learning today.