Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update Query 1

Status
Not open for further replies.

Skins64

Technical User
Oct 11, 2005
32
US
I have two tables....I want to update a field called Inv# in table "Consulting" with the data in a field called Invoice in table "SalesCredit"....what woyld the update query look like?


Thanks!!!
 
How are Consulting and SalesCredit related (joined) ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
The tables contain the same Work Order# and Company IDs.
 
UPDATE Consulting INNER JOIN SalesCredit ON Consulting.WorkOrder = SalesCredit.WorkOrder AND Consulting.CompanyID = SalesCredit.CompanyID
SET Consulting.[Inv#] = SalesCredit.Invoice

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I an fairly new to Access....so I do this in the query design grid?
 
In the SQL view pane of the query window.
You have to put the real field names.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Can't get this to work.....thanks anyway.

Anybody have any other ideas of how to get this accomplished?
 
tell us exactly what you have done so far, and post ALL the SQL you have tried.

Also give us the definitions of the table fields you are trying to update, and of the fields that compose the keys of all tables involved.



Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Both tables contain the same work order # in the the field name WorkOrder. Table consulting contains a field called SalesCredit and table SalesCredit contains a field called SlsCredit. I want to update field SalesCredit in table Consulting with the data in field SlsCredit in table SalesCredit.

I tried to create a join between WorkOrder# in both tables in an update query and update:

[SlsCredit].[SalesCredit]

Please help...thanks!
 
UPDATE Consulting INNER JOIN SalesCredit ON Consulting.WorkOrder = SalesCredit.WorkOrder
SET Consulting.SalesCredit = SalesCredit.SlsCredit

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top