If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
update query
anyone who can give me a sample database using update query
i want to update all records using calculated field from another table a sum of TableA.fieldA to my TableB.fieldB |
#2
|
|||
|
|||
update query
It seems you are attempting to store a value that may change and can be
derived by a calculation. If so, this is generally considered poor practice. However assuming in Northwind.mdb you want to total each customers Freight from all Orders and store it in a new field (TotalFreight) in the Customers table: UPDATE Customers SET Customers.TotalFreight = DSum("Freight","Orders","CustomerID='" & [CustomerID] & "'"); -- Duane Hookom Microsoft Access MVP "mccoy" wrote: anyone who can give me a sample database using update query i want to update all records using calculated field from another table a sum of TableA.fieldA to my TableB.fieldB |
#3
|
|||
|
|||
update query
tnx for the response!
i am trying to update all records from a link table if my way of updating data is wrong can u give me advice how to do it the right way please... again tnx.. "Duane Hookom" wrote: It seems you are attempting to store a value that may change and can be derived by a calculation. If so, this is generally considered poor practice. However assuming in Northwind.mdb you want to total each customers Freight from all Orders and store it in a new field (TotalFreight) in the Customers table: UPDATE Customers SET Customers.TotalFreight = DSum("Freight","Orders","CustomerID='" & [CustomerID] & "'"); -- Duane Hookom Microsoft Access MVP "mccoy" wrote: anyone who can give me a sample database using update query i want to update all records using calculated field from another table a sum of TableA.fieldA to my TableB.fieldB |
#4
|
|||
|
|||
update query
I am not aware of why you are attempting to do what you asked. I made some
assumptions and you didn't seem to confirm or deny my assumption. I gave you an answer/suggestion. Did it work? -- Duane Hookom Microsoft Access MVP "mccoy" wrote: tnx for the response! i am trying to update all records from a link table if my way of updating data is wrong can u give me advice how to do it the right way please... again tnx.. "Duane Hookom" wrote: It seems you are attempting to store a value that may change and can be derived by a calculation. If so, this is generally considered poor practice. However assuming in Northwind.mdb you want to total each customers Freight from all Orders and store it in a new field (TotalFreight) in the Customers table: UPDATE Customers SET Customers.TotalFreight = DSum("Freight","Orders","CustomerID='" & [CustomerID] & "'"); -- Duane Hookom Microsoft Access MVP "mccoy" wrote: anyone who can give me a sample database using update query i want to update all records using calculated field from another table a sum of TableA.fieldA to my TableB.fieldB |
Thread Tools | |
Display Modes | |
|
|