Affichage des articles dont le libellé est Update Value In A Table From Another Table. Afficher tous les articles
Affichage des articles dont le libellé est Update Value In A Table From Another Table. Afficher tous les articles

Update Value In A Table From Another Table

mercredi 18 mars 2015

I'm trying to update a value in a table from another table. I'm getting zero records in return. Can anyone see why my query does not work. The tables and "Update" query are below.





Table1 --- Column to be replaced



Payee --- Category

John --- Manager --- Fulltime

Jane --- Clerk --- Fulltime

James --- Account --- Fulltime

Joan --- Assistant Manager --- Fulltime

Jenny --- Technical Advisor --- Fulltime





Table2 --- Column replacement



Payee --- Category

John --- Account --- Deli Department

Jane --- Assistant Manager --- Shoe Department

James --- Manager --- Produce Department

Joan --- Clerk --- Cashier

Jenny --- Technical Advisor --- IT Department





Table1 --- Final results



Payee --- Category

John --- Account --- Fulltime

Jane --- Assistant Manager --- Fulltime

James --- Manager --- Fulltime

Joan --- Clerk --- Fulltime

Jenny --- Technical Advisor --- Fulltime



Query is below



UPDATE Table1 INNER JOIN Table2

ON Table1.Account = Table2.Category

SET Table1.Account = [Table2].[Category]

WHERE (((Table2.PayeeSelectBox)=[Payee]));

Update Value In A Table From Another Table

Labels