Results 1 to 2 of 2

Thread: Update query

  1. #1
    Join Date
    Mar 2006
    Posts
    42

    Unanswered: Update query

    I have an updatable query based on 2 queries.qryinput and qry output. I want to update a field in the table products with this result. Since the query is non updatable ,how should i proceed, can i use the dlookup function? How should it look like? My query is the following
    SELECT qryInput.ProductID, qryInput.Sum1, qryOutput.Sum2, [Sum1]-[Sum2] AS Rest
    FROM (qryInput INNER JOIN qryOutput ON qryInput.ProductID = qryOutput.ProductID) INNER JOIN products ON qryInput.ProductID = products.Productid;

    I want to update the field products.items4( table products,field items4) with the field Rest from the query.
    Can you help me ?

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Code:
    UPDATE products
    SET    items4 = qryInput.Sum1 - qryOutput.Sum2
    FROM   ...
    George
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •