Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Thanked 0 Times in 0 Posts

    Re: update query (Access 2000)

    I tested the statement:

    UPDATE Orders INNER JOIN Orders1 ON Orders.PaymentID = Orders1.PaymentID SET Orders.BankID = [Orders1].[BankID], Orders.InvoiceDate = [Orders1].[InvoiceDate], Orders.PaymentMethodID = [Orders1].[PaymentMethodID];

    and for each joined PaymentID, it updated the 3 fields in Orders to the values in Orders1.

    You will need to change the joined field from PaymentID (I didn't see what you were joining on, so I used PaymentID) to yourjoinfield and add PaymentID to the SET clause so it's values will change as well. HTH

  2. #2
    2 Star Lounger
    Join Date
    Nov 2001
    Thanked 0 Times in 0 Posts

    update query (Access 2000)

    Can i have a help with an Update query? I want to update the fields paymentid,bankid,invoicedate and Paymentmethodid
    from the table orders to be equal to the same fields in the table orders1.In other words, i want to insert the values from the table orders1 into the table orders.The values in the table orders are in fact old values and the values in the table orders1 are the new values.
    I am confused about the expressions Insert Into and Update and i cannot handle the wizard.
    Below are the two select clauses,just for orientation.

    SELECT orders.paymentid, orders.bankid, orders.invoicedate, orders.PaymentMethodID
    FROM orders;

    SELECT orders1.paymentid, orders1.bankid, orders1.invoicedate, orders1.PaymentMethodID
    FROM orders1;

    I suppose the code shoud read
    Update orders ( or orders1? i am not sure) .paymentid SET orders.paymentid = orders1.paymentid, orders1.bankid = orders1.bankid

    but what i write did not make sense to me.Shall i write InsertInto instead of Update?

Posting Permissions

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