Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Updare query (Access 2000)

    My query does not update and i guess i have built it false.From 2 idenical tables, orders and orders1, i want to update the field paragonsum from the table orders to be equal to the field orderif from the tble orders1.I get no errors but o records are updated.Could i update it?

    UPDATE orders INNER JOIN orders1 ON orders.orderid = orders1.orderid SET orders1.paragonsum = [orders].[orderid];

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Updare query (Access 2000)

    For a start you are trying to update paragonsum in table orders1 with the orderid from the orders table.
    Is orderid the PK of both tables?

    Would you provide a zipped version of your database.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Updare query (Access 2000)

    I did not spot that initially, but Patt is right. You have your references the wrong way.
    Try: UPDATE orders INNER JOIN orders1 ON orders.orderid = orders1.orderid SET orders.paragonsum = [orders1].[orderid];
    Regards,
    Rudi

  4. #4
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Updare query (Access 2000)

    Thank you i am sending the version. Actually i want the field paragonsum from the last order of the table orders to be updated to the orderid of the table orders1.In my example : the order 2197 should have paragonsum = 142894
    Attached Files Attached Files

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Updare query (Access 2000)

    Why on earth are you trying to do that for. Would you like to explain why and what you are trying to do.

    For a start there is no point trying to join both tables as the orderid's dont match.

Posting Permissions

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